[erlang-questions] Driver Threading & Message Sending
Ulf Wiger
ulf@REDACTED
Tue Sep 18 08:12:50 CEST 2007
2007/9/18, Benjamin Tolputt <bjt@REDACTED>:
>
> The benefit of Erlang which are pushing me to evangelize it to the game
> development crew is the high concurrency and CPU utilization on
> multi-core machines (i.e. it's SMP capabilities). To this end, they
> asked if it would be possible for them to run their physics & AI modules
> in a separate started up in a Erlang driver. This seems quite possible,
> but I wanted to know a couple of things about how threading & drivers
> are allowed to operate.
If you haven't already done so, you might want to read the tutorials
in the ERTS User's Guide, e.g. 6.5 - Sample Asynchronous Driver:
http://www.erlang.org/doc/apps/erts/driver.html#6.5http://www.erlang.org/doc/apps/erts/driver.html#6.5
In this example, the driver calls output_port() to send a message to
the port owner, when there is something to report.
BR,
Ulf W
More information about the erlang-questions
mailing list