News

muvee Reveal - the latest incarnation of muvee's flagship product - has just been released on 11 June 2008! The behaviours of the 8 bundled styles are specified using muSE, in addition to all the styles developed for the now discontinued muvee autoProducer 6.1.

Wednesday, November 08, 2006

Multiple muSE instances

When embedding muSE into an existing C/C++ program, there are a few ground rules for creating and using muSE environments a.k.a. execution contexts.


  1. You are allowed to create multiple muSE environments in a single process.

  2. You have to limit all expression evaluation to a single thread of execution.

  3. You can switch between different environments using the muse_set_current_env() API call. If you don't the last created environment will be the current environment for evaluating expressions.

  4. If you statically link muSE into a shared module (.dll/.so), each shared module gets its own current environment state and will not interfere with other shared libraries.


In the future, the current environment state may become thread-local, in which case you'll be able to use different environments simultaneously in different threads. Still, a single environment will be allowed to be the current environment of only one thread at a time. Note that the API won't need to change to support this behaviour extension.

No comments: