Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Q] inter_process communication in CamlTk,OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bomshik Kim <bskim@r...>
Subject: [Q] inter_process communication in CamlTk,OCaml

Hello.

Now I'm making some application with CamlTk and OCaml.
Problem is how to communicate between GUI part and Working part.

In GUI part, there are start_work button, and stop_work button.
The work is started in a new_process (by fork) by clicking 
start_work button. But the work may take a long time 
(let's assume 10 min) and raise an exception. 
and I want to make the result of work shown on GUI Text.
So GUI part should receive the result from Work part.

Usually, socket is used for inter_process communication.
If recvfrom function is used for receiving the result 
from Work part by UDP, then any other input event is not
archieved. Because GUI waits the result(sleep until receiving the result).
That means user can't stop the work by clicking stop_work button
in the middle of Work processing .

If there is nice method to communicate between parent(GUI part) process
and child (Working part) process, let me know it.

Sincerely

--
Bomshik Kim, M.S. Candidate   
Programming Language Lab.
Division of CS, Dept. of EECS, KAIST
http://ropas.kaist.ac.kr/~bskim