::SHE+ILA:: Interthread Messaging

Stylish Woman in Purple Velvet Gown by Ornate Door
61
0
  • Squishy Plushie's avatar Artist
    Squishy Pl...
  • Prompt
    Read prompt
  • DDG Model
    AIVision
  • Access
    Public
  • Created
    2d ago
  • Try

More about ::SHE+ILA:: Interthread Messaging

Let's say two threads A and B want to talk to each other, and we have mapped address register 50 (@50) to them (address registers are automatically shared between threads in the same task). A Buf WOO will be used as a "mailbox" or "pipe".
Thread A :
@50!WOO << "Hello";
{? @50!WOO ?}; // Wait for WOO;
ttyout ("Thread A read ", @50!WOO, CRLF); // Print the result;
Thread B :
{? @50!WOO ?}; // Wait for WOO;
ttyout ("Thread B read ", @50!WOO, CRLF);
@50!WOO << "Squishy"; // Send a reply;

Comments


Loading Dream Comments...

Discover more dreams from this artist