rodbus (.NET API) 1.3.1
Loading...
Searching...
No Matches
rodbus.Runtime Class Reference

Handle to the underlying runtime More...

Public Member Functions

 Runtime (RuntimeConfig config)
 Creates a new runtime for running the protocol stack. More...
 
void Shutdown ()
 Destroy a runtime. More...
 
void SetShutdownTimeout (TimeSpan timeout)
 By default, when the runtime shuts down, it does so without a timeout and waits indefinitely for all spawned tasks to yield. More...
 

Detailed Description

Handle to the underlying runtime

Constructor & Destructor Documentation

◆ Runtime()

rodbus.Runtime.Runtime ( RuntimeConfig  config)
inline

Creates a new runtime for running the protocol stack.

Warning: The runtime should be kept alive for as long as it's needed and it should be released with Runtime.Shutdown()

Parameters
configRuntime configuration
Exceptions
ParamException

Member Function Documentation

◆ SetShutdownTimeout()

void rodbus.Runtime.SetShutdownTimeout ( TimeSpan  timeout)
inline

By default, when the runtime shuts down, it does so without a timeout and waits indefinitely for all spawned tasks to yield.

Setting this value will put a maximum time bound on the eventual shutdown. Threads that have not exited within this timeout will be terminated.

Warning: This can leak memory. This method should only be used if the the entire application is being shut down so that memory can be cleaned up by the OS.

Parameters
timeoutMaximum number of seconds to wait for the runtime to shut down

◆ Shutdown()

void rodbus.Runtime.Shutdown ( )
inline

Destroy a runtime.

This method will gracefully wait for all asynchronous operation to end before returning


The documentation for this class was generated from the following file: