Welcome Guest. Please Login or Register. Apr 1st, 2018, 03:54am
ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018. We apologize Conforums does not have any export functions to migrate data. Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.
Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
Re: Serialized callbacks
« Reply #1 on: Nov 28th, 2016, 01:24am »
I'm pretty certain I haven't had any issues arise from this, though I don't have very many callbacks in my program. Over the past 2 years they have probably been called a few trillion times
I'm pretty certain I haven't had any issues arise from this, though I don't have very many callbacks in my program. Over the past 2 years they have probably been called a few trillion times
Callbacks in other languages, like C, typically won't be serialized so LBB is working 'conventionally', which is why I would not generally expect there to be a problem.
The particular program which alerted me to this issue is 'Liberty 8' which was recently posted at the LB Community Forum; this is an interpreter for the CHIP-8 virtual games machine. In this program Windows Timer Callbacks are used to control various aspects of the virtual machine, including instruction fetches; obviously these must happen in the correct sequence!
Fortunately in this particular case the problem can be easily circumvented by incorporating a semaphore which causes 'early' callbacks to be discarded.