Demo entry 6785138

SynchTest()

   

Submitted by LT on Mar 13, 2019 at 09:59
Language: C++. Code size: 228 Bytes.

void
SynchTest()
{
    const int maxCars = 7;  // How much traffic?
    int i = 0;
    Thread *ts[maxCars];

    for(i=0; i < maxCars; i++) {
	ts[i] = new Thread("forked thread");
	ts[i]->Fork(SynchThread, i);
    }
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).