chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] (apparently) solved; patch attached -- was: clueless abo


From: F. Wittenberger
Subject: [Chicken-users] (apparently) solved; patch attached -- was: clueless about memory consumption.
Date: Sat, 24 Jul 2010 14:10:49 +0200

Hi all,

The attached diff against git head contains these modifications:

* ##sys#abandon-mutexes moved from library.scm to scheduler.scm
  and included in the hide list
  a) This is the only place where it is called.
  b) It must unblock threads waiting for the mutex, not just
     forget about them.  Added.
     Otherwise those threads and threads waiting for those will
     never unblock and eat up memory eternally.

* ##sys#thread-kill! : If the killed thread is blocked on a
  condition-variable or thread, remove it from the waiting queue.

* mutex-lock! : check for abandoned mutex *after* unblocking too.
  (Otherwise threads trying to lock a mutex when held, which is
   then abandoned, will blow through instead of raising an exception.)

* mutex-unlock! : remove the mutex from the owning thread.
  (Used to be the current thread, which is not true in general.)
  (Posted before.)

* thread-signal! : If the receiving thread is blocked on a thread,
  remove it from the waiting queue.

It appears to reduce chickens memory needs by far.

Please review/apply.

Best regards

/Jerry

Attachment: chicken.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]