[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Stalkern 2 <stalkern2@t...> |
| Subject: | Re: [Caml-list] Ocamlex/ocamlyacc breakage? |
How is it possible that different instances of a ocamlyacc parser applied to a complete, closed file spoil each other's reading, but _when I fork the process and have the parent Unix.wait for the child_ everything gets OK?? The only solution springing to my mind is that ocamlyacc is not quite reentrant! What should I do then? ;-O Ernesto Il Tuesday 08 April 2003 13:02, Stalkern 2 ha scritto: > Hello to everybody > > I've connected a ocamlex/ocamlyacc parser to a graphical button; this > parser parses a file. > > When I click on the button repeatedly and fast several times, the parser > starts but it crashes. Failures happen at unrelated, apparently random > positions, and strace shows unrelated, apparently random (in the range of > open files) Unix.select errors before the parse_error. > > I have put Unix.lockf locks, but readers are not exclusive. So I thought to > skip the whole reparsing in case a reading lock is already there, but the > F_TEST (*Test a region for other process locks*) command is documented for > use in Unix.lockf : file_descr -> lock_command -> int -> unit, that returns > unit, so how could a TEST ever be possible? > > Any hint? BTW the whole is in a program with threads and runs in a ocaml > compiled with posix threads, but this part does not use threads. > > Thank you in advance for any advice > > Ernesto > > ------------------- > 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 ------------------- 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