Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Using threads in compiled code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: John Max Skaller <skaller@o...>
Subject: Re: [Caml-list] Using threads in compiled code
If you're using threads with sockets, you might want to do what I did:
I took the library routine that launches a process on a connect
[establish_server .. seems to be defunct now ..]
and replaced enough code to make it launch a thread instead.
I used the John Reppy style channels from the Threads library Event
module for communication.

My application was designed
to provide an simulation of a telephone system.

Getting the logic and timing right was very tricky --
coding it in Ocaml was very easy, those Reppy channel things
are magic. The hardest part was managing termination ..

[I'd never written a serious multithreaded app before ..
Stevens + Ocaml makes a fine team :-]

BTW: if you're looking at mobile agents .. JoCaml
is worth examining... in fact, its worth examining
even if you're not :-)

-- 
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850




-------------------
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