Justin Phillips is writing code to allow Racket[*] to interact with Mac OS X 
MIDI events.  This OS code has the following interface, as I understand it: 
give me a callback, and I'll set up a new high priority thread to receive calls 
to this callback.

Unfortunately, as we understand it, having a separate thread call racket code 
is a big no-no. 

So, we have two threads running in the same process, needing to communicate.  
Ideally, we'd like to avoid polling, but I'm not sure what the best strategy 
is. Is there an obvious choice for allowing a C thread to send a signal 
(perhaps just a Unix 'signal'?) to the racket threads? Could the C code 
manipulate a racket semaphore? I pawed through Inside PLT Scheme for a bit, but 
didn't find what I was looking for.

Suggestions and doc pointers much appreciated,

John Clements





[*] When should we start calling it "racket" on plt-scheme?  The only reason I 
sent this message to plt-dev and not to plt-scheme was because I wasn't sure 
about the answer to this question.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_________________________________________________
  For list-related administrative tasks:
  http://list.cs.brown.edu/mailman/listinfo/plt-dev

Reply via email to