[−][src]Enum gdnative::prelude::user_data::DeadlockPolicy
Policies to deal with potential deadlocks
As Godot allows mutable pointer aliasing, doing certain things in exported method bodies may
lead to the engine calling another method on owner
, leading to another locking attempt
within the same thread:
- Variant calls on anything may dispatch to a script method.
- Anything that could emit signals, that are connected to in a non-deferred manner.
As there is no universal way to deal with such situations, behavior of locking wrappers can be customized using this enum.
Variants
Block on all locks. Deadlocks are possible.
Never block on any locks. Methods will return Nil immediately if the lock isn't available. Deadlocks are prevented.
Timeout(Duration)
Block on locks for at most Duration
. Methods return Nil on timeout. Deadlocks are
prevented.
Trait Implementations
impl Clone for DeadlockPolicy
[src]
fn clone(&self) -> DeadlockPolicy
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for DeadlockPolicy
[src]
impl Debug for DeadlockPolicy
[src]
impl Eq for DeadlockPolicy
[src]
impl Hash for DeadlockPolicy
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for DeadlockPolicy
[src]
fn cmp(&self, other: &DeadlockPolicy) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<DeadlockPolicy> for DeadlockPolicy
[src]
fn eq(&self, other: &DeadlockPolicy) -> bool
[src]
fn ne(&self, other: &DeadlockPolicy) -> bool
[src]
impl PartialOrd<DeadlockPolicy> for DeadlockPolicy
[src]
fn partial_cmp(&self, other: &DeadlockPolicy) -> Option<Ordering>
[src]
fn lt(&self, other: &DeadlockPolicy) -> bool
[src]
fn le(&self, other: &DeadlockPolicy) -> bool
[src]
fn gt(&self, other: &DeadlockPolicy) -> bool
[src]
fn ge(&self, other: &DeadlockPolicy) -> bool
[src]
impl StructuralEq for DeadlockPolicy
[src]
impl StructuralPartialEq for DeadlockPolicy
[src]
Auto Trait Implementations
impl RefUnwindSafe for DeadlockPolicy
impl Send for DeadlockPolicy
impl Sync for DeadlockPolicy
impl Unpin for DeadlockPolicy
impl UnwindSafe for DeadlockPolicy
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<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,