From: "Dmitry Bely" <dmitry.bely@gmail.com>
To: "Alain Frisch" <alain@frisch.fr>
Cc: ocaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml debugger under Windows
Date: Tue, 5 Feb 2008 20:23:32 +0300 [thread overview]
Message-ID: <90823c940802050923h77a95192gdabcd9c0807dccd6@mail.gmail.com> (raw)
In-Reply-To: <47A83251.7010306@frisch.fr>
On Feb 5, 2008 12:54 PM, Alain Frisch <alain@frisch.fr> wrote:
> Dmitry Bely wrote:
> > The topic has a long history [1], but since then nothing has actually
> > changed. It's easy to understand: INRIA people are busy and there are
> > probably quite few Ocaml users in the Windows land to worry about. So I
> > decided to do something myself :) (as it was with mingw port several
> > years ago).
> >...
> > If it's interesting for anyone I can publish a patch against Ocaml 3.10.1
>
> Yes, that's definitely interesting for us!
>
> Is there any hope to build the server with the mingw or msvc port?
As soon as the following function is rewritten:
debugger/input_handling.ml
(* Handle active files until `continue_main_loop' is false. *)
let main_loop () =
let old_state = !continue_main_loop in
try
continue_main_loop := true;
while !continue_main_loop do
try
let (input, _, _) =
select (List.map fst !active_files) [] [] (-1.)
in
List.iter
(function fd ->
let (funct, iochan) = (List.assoc fd !active_files) in
funct iochan)
input
with
Unix_error (EINTR, _, _) -> ()
done;
continue_main_loop := old_state
with
x ->
continue_main_loop := old_state;
raise x
here Unix.select() waits for both network and user input events. We
could split this into 2 threads, but how to interrupt network select()
when we going to exit? Well, we could use some small timeout value for
select() (say 500ms) and restart it the loop when !continue_main_loop
is set, but this looks not very elegant... Or it's OK?
The point is not to modify win32unix library or write Win32-specific C
functions for ocamldebug. I believe it's necessary to be ever accepted
by INRIA.
- Dmitry Bely
next prev parent reply other threads:[~2008-02-05 17:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-05 9:46 Dmitry Bely
2008-02-05 9:54 ` [Caml-list] " Alain Frisch
2008-02-05 17:23 ` Dmitry Bely [this message]
2008-02-05 17:40 ` Benedikt Grundmann
2008-02-05 19:39 ` Dmitry Bely
2008-02-05 21:00 ` Alain Frisch
2008-02-06 8:56 ` Dmitry Bely
2008-02-06 17:12 ` Xavier Leroy
2008-02-06 18:22 ` Dmitry Bely
2008-05-03 18:39 ` Dmitry Bely
2008-02-08 13:27 ` Kuba Ober
2008-02-08 16:33 ` Dmitry Bely
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=90823c940802050923h77a95192gdabcd9c0807dccd6@mail.gmail.com \
--to=dmitry.bely@gmail.com \
--cc=alain@frisch.fr \
--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).