Re: RFC 86 (v1) IPC Mailboxes for Threads and Signals
[email protected] (Uri Guttman) Thu, 10 Aug 2000 20:08:38 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected].> |
>>>>> "CF" == Chaim Frenkel <[email protected]> writes: CF> How does this look different from an inter-thread visible array CF> treated as a queue? CF> Thread A CF> push(@workqueue, $val) CF> Thread B CF> $val = pop(@workqueue) CF> Where accessing the global variable is guaranteed by perl to be atomic. CF> (i.e. Do we need another construct?) i think we do because a thread can block on a mailbox while it can't on an array. also the mailbox idea allows delivery of signals and other asynch callbacks so it serves double duty. the idea is that the core manages it instead of the application. it has a builtin mutex so you don't have to use one or declare somthign shared. it does not stop you from sharing stuff but it provides an core level interface for comunications. uri -- Uri Guttman --------- [email protected] ---------- http://www.sysarch.com SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books The Best Search Engine on the Net ---------- http://www.northernlight.com