caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: xuzq <zuoqian@gmail.com>
To: caml-list@inria.fr
Subject: Re: perl4caml crashed with threads
Date: Tue, 15 Nov 2005 02:03:20 +0000 (UTC)	[thread overview]
Message-ID: <loom.20051115T023040-429@post.gmane.org> (raw)
In-Reply-To: <20051114100945.GA20179@furbychan.cocan.org>

Richard Jones <rich <at> annexia.org> writes:

> 
> On Mon, Nov 14, 2005 at 02:16:43AM +0000, xuzq wrote:
> > On my debian sid box,the following prog core dump.What's wrong?Is it
> > all right on your machine or is it a bug?
> 
> This crashes on my machine too.  However if you remove all references
> to threads, then it works.  libperl and perl4caml don't make any
> attempt to be thread-safe.
> 
> Rich.
> 
Yes,it 's ok without threads and i see perl4caml may not be thread-safe.I 'm
only curious about why only "eval" crashes and "call" looks fine.In my program
another thread run the following code without any error.

    let (sv_dbf_sz,sv_dbf_sh)=(call_class_method "CAM::DBF" "new" [sv_of_string
path_sz],call_class_method "CAM::DBF" "new" [sv_of_string path_sh]) in
    let (rn_sz,rn_sh)=(int_of_sv (call_method sv_dbf_sz "nrecords" []),int_of_sv
(call_method sv_dbf_sh "nrecords" [])) in
      for i=0 to rn_sz-1 do 
	let row = call_method_array sv_dbf_sz "fetchrow_array" [sv_of_int i] in 
	  match row with
...	    

Thank you for your excellent perl4caml,Richard!Would it be possible for perl
to callocaml code just like the Inline::OCaml thoughts in that post:
http://caml.inria.fr/pub/ml-archives/caml-list/2002/02/
e363d76f1e9b94779b1ffe7de3a7c011.en.html?



  parent reply	other threads:[~2005-11-15  2:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-14  2:16 xuzq
2005-11-14 10:09 ` [Caml-list] " Richard Jones
2005-11-14 10:02   ` Florian Weimer
2005-11-15  2:03   ` xuzq [this message]
2005-11-15 11:52     ` [Caml-list] " Richard Jones
  -- strict thread matches above, loose matches on Subject: below --
2005-11-13 13:38 Xu Zuoqian

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=loom.20051115T023040-429@post.gmane.org \
    --to=zuoqian@gmail.com \
    --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).