[erlang-questions] driver_create_port overhead and driver_caller

Tim Watson watson.timothy@REDACTED
Tue Jun 18 16:02:15 CEST 2013

On 18 Jun 2013, at 14:35, Lukas Larsson wrote:
> The good thing about using the driver queue is that if there is data and a flush callback is implemented you can make sure that data is handled before closing the port. So that you don't loose things which you might need. If you do notice that you get a lot of contentions on the pdl you can of course roll your own more fine grained locking and just stick a byte of data in the driver queue in order to trigger flushes.

Oh, that's nifty, I like it. Is there any benefit to doing that versus creating a pipe and using driver_select to signal/check?

> File I/O uses the same async threads as drivers. In fact the I/O drivers do not use any functionality which is not available to any other driver. So if you do have long running jobs in the async pool it could interfere with the latency of file I/O. 

Hmn, ok that's for clearing that up - it's important to be aware of the risks there.


More information about the erlang-questions mailing list