mamcx Guest
|
Posted: Wed Aug 23, 2006 10:20 pm Post subject: Is possible implement Erlang trhead concepts in Delphi? |
|
|
I'm looking for ways to improve the code of my Delphi applications, and
I'm visiting other languages like python, ruby.
Some time ago I look at erlang
(http://en.wikipedia.org/wiki/Erlang_programming_language) and think
Pid = spawn(Mod, Func, Args) % execute function Func as new process
Pid = spawn(Node, Mod, Func, Args) % execute function Func in remote
node Node
Pid ! a_message % send message to the process (asynchronously)
receive % receive message sent to this process
a_message -> do_something;
{data, Data_content} -> do_something_else(); % This is a tuple of a
type atom and some data
{hello, Text} -> io:format("Got hello message: ~s", [Text]);
{goodbye, Text} -> io:format("Got goodbye message: ~s", [Text])
end.
Is easy to grasp...
Any reason this can't do done in Delphi? |
|