[−][src]Struct rustc_data_structures::jobserver::GLOBAL_CLIENT
Fields
__private_field: ()Methods from Deref<Target = Client>
pub fn acquire(&self) -> Result<Acquired, Error>[src]
Acquires a token from this jobserver client.
This function will block the calling thread until a new token can be acquired from the jobserver.
Return value
On successful acquisition of a token an instance of Acquired is
returned. This structure, when dropped, will release the token back to
the jobserver. It's recommended to avoid leaking this value.
Errors
If an I/O error happens while acquiring a token then this function will return immediately with the error. If an error is returned then a token was not acquired.
pub fn configure(&self, cmd: &mut Command)[src]
Configures a child process to have access to this client's jobserver as well.
This function is required to be called to ensure that a jobserver is
properly inherited to a child process. If this function is not called
then this Client will not be accessible in the child process. In other
words, if not called, then Client::from_env will return None in the
child process (or the equivalent of Child::from_env that make uses).
Platform-specific behavior
On Unix and Windows this will clobber the CARGO_MAKEFLAGS environment
variables for the child process, and on Unix this will also allow the
two file descriptors for this client to be inherited to the child.
On platforms other than Unix and Windows this panics.
pub fn acquire_raw(&self) -> Result<(), Error>[src]
Blocks the current thread until a token is acquired.
This is the same as acquire, except that it doesn't return an RAII
helper. If successful the process will need to guarantee that
release_raw is called in the future.
pub fn release_raw(&self) -> Result<(), Error>[src]
Releases a jobserver token back to the original jobserver.
This is intended to be paired with acquire_raw if it was called, but
in some situations it could also be called to relinquish a process's
implicit token temporarily which is then re-acquired later.
Trait Implementations
impl Deref for GLOBAL_CLIENT[src]
impl LazyStatic for GLOBAL_CLIENT[src]
fn initialize(lazy: &Self)[src]
Auto Trait Implementations
impl RefUnwindSafe for GLOBAL_CLIENT
impl Send for GLOBAL_CLIENT
impl Sync for GLOBAL_CLIENT
impl Unpin for GLOBAL_CLIENT
impl UnwindSafe for GLOBAL_CLIENT
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut Tⓘ[src]
impl<'a, T> Captures<'a> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Erased for T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,