Concurrency - mdoug/FIAL GitHub Wiki

Features

FIAL does not yet have any concurrency routines in and of itself, and it is probable that it will remain that way. However, there are nonetheless several features which are useful for concurrency:

  1. An execution environment includes everything it needs in order to operate -- it is fully self contained. Thus, an application can create as many of these as possible, and run them as it pleases, provided that each execution environment is running in at most one thread at a time.
  2. The ability to set an interpreter to a "run" state, which essentially makes it read only, at least as far as changing it from FIAL is concerned (any restraints on the C api is easily circumvented, there is no meaningful way to prevent operations at that level, even if it were desireable.) This allows the load all of libraries ahead of time, then set the interpreter to run, and then have threads access it in a read only manner.
  3. FIAL is aiming at providing convenient structures that can be used to encapsulate everything necessary to create a library that provides for threading abilities from a FIAL script. As to actually providing, for instance, a FIAL value type of "thread," I am not sure that fits entirely within the design goals of FIAL, as it would seem that would place restrictions on the embedding application.
  4. There will, however, be such an implementation, it just will not be a core part of FIAL. The first such implementation will probably use SDL threading, since that would seem to meet my immediate needs the best