Enum sequoia_ipc::IPCPolicy [−][src]
pub enum IPCPolicy {
External,
Internal,
Robust,
}
Expand description
IPC policy for Sequoia.
With this policy you can control how Sequoia starts background servers.
Variants
External background servers only.
We will always use external background servers. If starting one fails, the operation will fail.
The advantage is that we never spawn a thread.
The disadvantage is that we need to locate the background
server to start. If you are distribute Sequoia with your
application, make sure to include the binaries, and to
configure the Context so that context.lib()
points to the
directory containing the binaries.
Internal background servers only.
We will always use internal background servers. It is very unlikely that this fails.
The advantage is that this method is very robust. If you
distribute Sequoia with your application, you do not need to
ship the binary, and it does not matter what context.lib()
points to. This is very robust and convenient.
The disadvantage is that we spawn a thread in your
application. Threads may play badly with fork(2)
, file
handles, and locks. If you are not doing anything fancy,
however, and only use fork-then-exec, you should be okay.
Prefer external, fall back to internal.
We will first try to use an external background server, but fall back on an internal one should that fail.
The advantage is that if Sequoia is properly set up to find the background servers, we will use these and get the advantages of that approach. Because we fail back on using an internal server, we gain the robustness of that approach.
The disadvantage is that we may or may not spawn a thread in
your application. If this is unacceptable in your
environment, use the External
policy.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for IPCPolicy
impl UnwindSafe for IPCPolicy
Blanket Implementations
Mutably borrows from an owned value. Read more
type Output = T
type Output = T
Should always be Self