Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ThreadedClassConfig

Hierarchy

  • ThreadedClassConfig

Index

Properties

autoRestart?: boolean

If the process crashes or freezes it's automatically restarted. (ThreadedClassManager will emit the "restarted" event upon restart)

autoRestartRetryCount?: number

If an autoRestart fails and this is set, ThreadedClass will continue to try to restart the thread. (defaults is 1, 0 means continue to restart indefinitely)

autoRestartRetryDelay?: number

(milliseconds), how long to wait before retrying to restart the thread. (default is 1000 ms)

disableMultithreading?: boolean

Set to true to disable multi-threading, this might be useful when you want to disable multi-threading but keep the interface unchanged.

freezeLimit?: number

(milliseconds), how long to wait before considering the child to be unresponsive. (default is 1000 ms, 0 disables this timeout)

instanceName?: string

Optional: name of the instance, used in debugging

killTimeout?: number

If the process is being killed, how long to wait for it to terminate, before failing. (default is 1000ms, 0 disables this timeout)

pathToWorker?: string

Set path to worker, used in browser

restartTimeout?: number

If the process needs to restart, how long to wait for it to initalize, before failing. (default is 1000ms, 0 disables this timeout)

threadId?: string

Set to an arbitrary id to put the instance in a specific thread. Instances with the same threadIds will be put in the same thread.

threadUsage?: number

A number between 0 - 1, how large part of a thread the instance takes up. For example; if set to 0.1, a thread will be re-used for up to 10 instances. If not set, a new thread will be created for each instance.

Generated using TypeDoc