Mike,

while talking with ISAWHIM about thinBasic Callbacks and other stuff about function pointers, I was thinking about a more generalized TBEM way to check if a an event must be fired.

Currently for TBEM to properly works, there is the necessity to add a TBEM_Run call in a loop.
What about if TBEM, on startup, creates an internal thread and use it to internally check about events? Maybe a new keyword like TBEM_InstallThread (or something like that) could be used to instruct TBEM the script wants to go with TBEM internal thread while if no TBEM_InstallThread than TBEM_Run is still valid.

This method can add a more general use of TBEM and possibly fire events even if main thinCore engine is busy on long execution scripts that will not let the execution cursor return into the main loop and fire a new TBEM_Run. This last part is still to be tested though.

What do you think?

Ciao
Eros