質問

Gwan documentation claims that C scripts using BSD sockets are transparently managed asynchronously.

How can i make sure that a given piece of code/library i am using in a C script will behave asynchronously when performing network operation? E.g is there a way to check this in logs?

I would have a similar request when performing disk IO. For example, the imgsz.c example reads images from the disk through ImageMagick .MagickReadImage() fonction. Is this disk read operation managed asynchronously? Or should the imgsz.c example be rewritten (e.g with xbuf_frfile() and MagickReadImageBlob() ?

Thanks in advance for your help

役に立ちましたか?

解決

How can i make sure that a given piece of code/library...

G-WAN provides the functions that will be called by your code, so there's no normal way for shared libraries (or G-WAN C/C++,D and Objective-C scripts) to bypass this feature when it is enabled by G-WAN.

Java and C# can bypass this feature because they use a virtual machine (out of the scope of the G-WAN process).

I would have a similar request when performing disk I/O

Unfortunately, epoll does not support file descriptors used to open disk files (it supports pipes and sockets).

If the disk latency is an issue then use a ramdisk (or an SSD if you need much more space than the available RAM).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top