Realtime safe signalling?



I'm hacking on a MIDI sequencer program that will run in at least two
threads; one GUI thread and one sequencer thread that will wake up now
and then to sequence MIDI events. The sequencer thread needs to run in
realtime mode (low nice-value and SCHED_FIFO on Linux), and so some of
the functions need to be realtime safe (they cannot contain any blocking
system calls).

Is it OK to use Glib::Dispatcher::emit() in a realtime safe function, or
will that block when writing the signal to the pipe? Is there any other
way to send signals between threads (except using a semaphore and a
timeout signal in the GUI thread that checks it)?

-- 
Lars Luthman
PGP key:     http://www.d.kth.se/~d00-llu/pgp_key.php
Fingerprint: FCA7 C790 19B9 322D EB7A  E1B3 4371 4650 04C7 7E2E

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]