Re: [AD] Non C program accessing Allegro on OS X |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Wednesday, October 26, 2005, at 03:24 am, Jon Rafkind wrote:
While hacking the crap out of the OS X code I discovered that a Bus
error would occur if rest(1) was called while the usleep( 100000 /
refresh_rate ) happened. Im about to goto sleep and dont have to to
investigate it now but does it sound like that might be a race
condition?
Rest ends up calling usleep anyway; I don't see why calling usleep in 2
threads can be a race condition. Please let me know what you find!
Regarding your first problem, it is as Elias says. The complication is
that events only get delivered to thread 1* so the event handler must
be in thread 1, with your code in thread 2. Other threads are used for
timers and audio.
Pete
* This is something that lillo determined in the beginning, so I don't
know if there's a tricky way around it.