From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA30936; Fri, 18 Jul 2003 15:32:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA12988 for ; Fri, 18 Jul 2003 15:32:28 +0200 (MET DST) Received: from inria.fr (macaque.inria.fr [128.93.8.158]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h6IDWRf25043 for ; Fri, 18 Jul 2003 15:32:27 +0200 (MET DST) Date: Fri, 18 Jul 2003 15:32:29 +0200 Subject: Re: [Caml-list] PortAudio on ocaml Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Damien Doligez To: caml-list@inria.fr Content-Transfer-Encoding: 7bit In-Reply-To: <652B2F34-B7B5-11D7-B208-000393C43D24@bu.edu> Message-Id: <47618939-B924-11D7-BC89-0003930FCE12@inria.fr> X-Mailer: Apple Mail (2.552) X-Loop: caml-list@inria.fr X-Spam: no; 0.00; damien:01 caml-list:01 liu:99 callback:01 dispatching:01 runtime:01 ocaml:01 garbage:01 blocking:01 doligez:01 thread:02 o'caml:02 wrote:03 probably:05 feet:93 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday, July 16, 2003, at 07:46 PM, Likai Liu wrote: > is a "leave_blocking_section()" call enough to guarentee that? > > liulk > > On Wednesday, July 16, 2003, at 12:57 PM, Damien Doligez wrote: > >>> I think garbage collection inside the callback is probably okay, if >>> it doesn't do other fancy things, such as dispatching signals or >>> influence thread scheduling. What does O'Caml runtime do during >>> garbage collection? >> >> Garbage collection inside the callback is probably OK, if you can >> guarantee >> that the callback does not occur during garbage collection, or any >> other >> operation that assumes that memory doesn't move under its feet. >> If the callback is invoked in a thread, yes. But then you are back to square 1: leave_blocking_section will wait for the master lock, and your program is not real-time. -- Damien ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners