caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stalkern 2 <stalkern2@tin.it>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Ocamlex/ocamlyacc breakage?
Date: Tue, 8 Apr 2003 18:08:48 +0200	[thread overview]
Message-ID: <200304081808.48574.stalkern2@tin.it> (raw)
In-Reply-To: <200304081239.13990.stalkern@tiscalinet.it>

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


  reply	other threads:[~2003-04-08 15:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 11:02 Stalkern 2
2003-04-08 16:08 ` Stalkern 2 [this message]
2003-04-08 18:02   ` Tim Freeman
2003-04-08 23:20     ` Stalkern 2
2003-04-09  0:16       ` Jacques Garrigue
2003-04-13 14:33         ` John Max Skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200304081808.48574.stalkern2@tin.it \
    --to=stalkern2@tin.it \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).