Ignore:
Timestamp:
Oct 6, 2021, 8:40:19 PM (4 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
05c941a, 68fe946e
Parents:
8dcb832
Message:

convert from test programs I/O acquire to mutex statement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrent/sleep.cfa

    r8dcb832 r237df76  
    11#include <fstream.hfa>
    22#include <thread.hfa>
     3#include <mutex_stmt.hfa>
    34#include <time.hfa>
    45
     
    2930
    3031int main() {
    31         sout | acquire | "start";
     32        mutex( sout ) sout | "start";
    3233        {
    3334                slow_sleeper slow;
     
    3637                yield();
    3738        }
    38         sout | acquire | "done";
     39        mutex( sout ) sout | "done";
    3940}
    4041
Note: See TracChangeset for help on using the changeset viewer.