Changeset 36301 in project


Ignore:
Timestamp:
08/16/18 22:47:32 (19 months ago)
Author:
sjamaan
Message:

Add scsh-process to eggref/5

File:
1 copied

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/scsh-process

    r36298 r36301  
    3434===== Forking and threads
    3535
    36 In versions of Chicken before 4.8.1 (rev 47b5be71), there is no
    37 support for killing threads upon forking.  This means that other
    38 threads will always continue running whenever you fork.  Please note
    39 that all of the EPF forms implicitly fork for each process in a
    40 pipeline.  If you intend to use {{scsh-process}} in a program which
    41 uses threads, please use a Chicken which supports this, otherwise you
    42 ''will'' get unpredictable behavior.
    43 
    44 If you are using threads at all, it is important to realize that
    45 thread killing is completely insensitive to your delicate
    46 synchronization primitives or resource management.  Ensure that all
    47 locks are released and you don't have any non-GCable memory allocated
    48 in other threads.  If you have finalizers registered, those will still
    49 run, though.
     36If you are using threads, it is important to realize that thread
     37killing is completely insensitive to your delicate synchronization
     38primitives or resource management.  Ensure that all locks are released
     39and you don't have any non-GCable memory allocated in other threads.
     40If you have finalizers registered, those will still run, though.
    5041
    5142===== Signal handling
     
    173164
    174165<enscript highlight="scheme">
    175 (use scsh-process)
     166(import scsh-process)
    176167
    177168;; Writes "1235" to a file called "out" in the current directory.
     
    308299otherwise.
    309300
    310 Since version 0.8 of scsh-process, this procedure is nonblocking,
    311 which means you can {{wait}} for a child in a thread and have the
    312 other threads continue to run; the process isn't suspended, but a
    313 signal handler will take care of unblocking the waiting thread.
     301This procedure is nonblocking, which means you can {{wait}} for a
     302child in a thread and have the other threads continue to run; the
     303process isn't suspended, but a signal handler will take care of
     304unblocking the waiting thread.
    314305
    315306
     
    355346
    356347<enscript highlight="scheme">
    357 (use scsh-process posix)
     348(import scsh-process (chicken file posix))
    358349
    359350(process-wait
     
    415406=== Changelog
    416407
     408* 1.4.0 - Port to CHICKEN 5 (thanks to Vasilij Schneidermann for providing an initial patch).
    417409* 1.3.0 - Fix {{>}} redirection to truncate existing files (thanks to Jörg F. Wittenberger).
    418410* 1.2.2 - Fix {{(= 1 2)}} style redirection to be the correct way around, to match documentation and the original SCSH implementation (thanks to Diego "dieggsy").
Note: See TracChangeset for help on using the changeset viewer.