[clean-list] Process starting
Hernyák Zoltán
aroan at aries.ektf.hu
Wed Mar 8 13:59:53 MET 2006
Hi,
> Object I/O processes do not run in different threads/processes, so that
> will not work as you might expect.
Let's suppose, I want to write a consumer-producer -like application.
The main thread would be the consumer, while an other process would
be the producer. So there is no way to start on separate threads?
>
> Why don't you just create two programs (or one program that does two
> things depending on its command line arguments), and start them both
> using a script/batch file.
Because my task is to write programs which sends and receives data from outside.
This is a kind of port-reading-writing problems, where on the other side a 3rd party
program processes the data elements.
The main program is a kind of:
Start w =
#! w = sendAllData [1...10000] w
#! (result,w) = receiveAllData w
= result
This cannot work, because until all the elements of [1..1000] is not sended,
nothing is received. Let suppose, the 3rd party program reads one data element from the
port, and sends it back immediately on a synchronized way. So until the succesfull receiving it won't
read another data element from the port. The only idea is to solve is that:
Start w =
#! w = sendAllData_OnSeparateThread [1...10000] w
#! (result,w) = receiveAllData w
= result
So it can't be solved in Clean?? I barely think that :)
Zoltan Hernyak
More information about the clean-list
mailing list