event.pipe - Palamecia/mint GitHub Wiki
Module
load event.pipe
This module provides the Event.Pipe class which provides a one-way waitable communication mechanisme and can be used for inter-process communication.
Packages
Classes
Event.Pipe
This class provides a waitable pipe communication mechanisme that trigger an event when data become available on the read part.
This type is not copyable
Members
Modifiers | Member | Description |
---|---|---|
- const |
clone | Disable object copy. |
+ const |
delete | Cleans up the pipe instance. |
- final |
eventHandleRead | Internal read handle. |
- final |
eventHandleWrite | Internal write handle. |
- @ |
g_lib | Global library handle. |
+ const |
getHandle | Returns the handle used by Event.Watcher. |
+ const |
getReadHandle | Returns a handle useable by Event.Watcher to wait for data on the read end of... |
+ const |
getWriteHandle | Returns a handle useable by Event.Watcher to wait for data on the write end o... |
+ const |
new | Creates a new pipe. The created pipe is empty. If no pipe can be created, n ... |
+ const |
read | Returns the data contained in the read end of the pipe. The pipe's data is co... |
+ const |
reset | Reset the internal event state |
+ const |
wait | Waits until data is available on the read end of the pipe. If timeout is gi... |
+ const |
write | Writes the data on the write end of the pipe. |
Event.SystemPipe
This class provides a waitable pipe communication mechanisme that trigger an event when data become available on the read part and can be used to performe inter-process communication.
This type is not copyable
Members
Modifiers | Member | Description |
---|---|---|
- const |
clone | Disable object copy. |
- final |
eventHandleRead | Internal read handle. |
- final |
eventHandleWrite | Internal write handle. |
- @ |
g_lib | Global library handle. |
+ const |
getHandle | Returns the handle used by Event.Watcher. |
+ const |
getReadHandle | Returns a handle useable by Event.Watcher to wait for data on the read end of... |
+ const |
getWriteHandle | Returns a handle useable by Event.Watcher to wait for data on the write end o... |
+ const |
new | Creates a new pipe. The created pipe is empty. If no pipe can be created, n ... |
+ const |
read | Returns the data contained in the read end of the pipe. The pipe's data is co... |
+ const |
reset | Reset the internal event state |
+ const |
wait | Waits until data is available on the read end of the pipe. If timeout is gi... |
+ const |
write | Writes the data on the write end of the pipe. |
Descriptions
Event.Pipe.clone
none
Disable object copy.
Event.Pipe.delete
def (self)
Cleans up the pipe instance.
Event.Pipe.eventHandleRead
none
Internal read handle.
Event.Pipe.eventHandleWrite
none
Internal write handle.
Event.Pipe.g_lib
lib ('libmint-event')
Global library handle.
Event.Pipe.getHandle
def (const self)
Returns the handle used by Event.Watcher.
Event.Pipe.getReadHandle
def (const self)
Returns a handle useable by Event.Watcher to wait for data on the read end of the pipe.
Event.Pipe.getWriteHandle
def (const self)
Returns a handle useable by Event.Watcher to wait for data on the write end of the pipe.
Event.Pipe.new
def (self)
Creates a new pipe. The created pipe is empty.
If no pipe can be created, none
is returned.
Event.Pipe.read
def (self)
Returns the data contained in the read end of the pipe.
The pipe's data is contained in an instance of Serializer.DataStream.
Event.Pipe.reset
def (self)
Reset the internal event state
Event.Pipe.wait
def (self, timeout = none)
Waits until data is available on the read end of the pipe. If
timeout
is given, the wait stop after timeout
milliseconds if
the pipe still have no data to read.
Returns true
if data is available on the read end of the pipe;
otherwise returns false
if the wait timed out.
After a call to this method, the event is reseted.
Event.Pipe.write
def (self, data)
Writes the data
on the write end of the pipe.
Event.SystemPipe.clone
none
Disable object copy.
Event.SystemPipe.eventHandleRead
none
Internal read handle.
Event.SystemPipe.eventHandleWrite
none
Internal write handle.
Event.SystemPipe.g_lib
lib ('libmint-event')
Global library handle.
Event.SystemPipe.getHandle
def (const self)
Returns the handle used by Event.Watcher.
Event.SystemPipe.getReadHandle
def (const self)
Returns a handle useable by Event.Watcher to wait for data on the read end of the pipe.
Event.SystemPipe.getWriteHandle
def (const self)
Returns a handle useable by Event.Watcher to wait for data on the write end of the pipe.
Event.SystemPipe.new
def (self, fdRead, fdWrite)
Creates a new pipe. The created pipe is empty.
If no pipe can be created, none
is returned.
Event.SystemPipe.read
def (self)
Returns the data contained in the read end of the pipe.
The pipe's data is contained in an instance of Serializer.DataStream.
Event.SystemPipe.reset
def (self)
Reset the internal event state
Event.SystemPipe.wait
def (self, timeout = none)
Waits until data is available on the read end of the pipe. If
timeout
is given, the wait stop after timeout
milliseconds if
the pipe still have no data to read.
Returns true
if data is available on the read end of the pipe;
otherwise returns false
if the wait timed out.
After a call to this method, the event is reseted.
Event.SystemPipe.write
def (self, data)
Writes the data
on the write end of the pipe.