Enum gdnative::nativescript::user_data::DeadlockPolicy [−][src]
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]
pub fn clone(&self) -> DeadlockPolicy
[src]
pub 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]
pub fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
__H: Hasher,
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for DeadlockPolicy
[src]
pub fn cmp(&self, other: &DeadlockPolicy) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<DeadlockPolicy> for DeadlockPolicy
[src]
pub fn eq(&self, other: &DeadlockPolicy) -> bool
[src]
pub fn ne(&self, other: &DeadlockPolicy) -> bool
[src]
impl PartialOrd<DeadlockPolicy> for DeadlockPolicy
[src]
pub fn partial_cmp(&self, other: &DeadlockPolicy) -> Option<Ordering>
[src]
pub fn lt(&self, other: &DeadlockPolicy) -> bool
[src]
pub fn le(&self, other: &DeadlockPolicy) -> bool
[src]
pub fn gt(&self, other: &DeadlockPolicy) -> bool
[src]
pub fn ge(&self, other: &DeadlockPolicy) -> bool
[src]
impl StructuralEq for DeadlockPolicy
[src]
impl StructuralPartialEq for DeadlockPolicy
[src]
Auto Trait Implementations
impl RefUnwindSafe for DeadlockPolicy
[src]
impl Send for DeadlockPolicy
[src]
impl Sync for DeadlockPolicy
[src]
impl Unpin for DeadlockPolicy
[src]
impl UnwindSafe for DeadlockPolicy
[src]
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> CallHasher for T where
T: Hash + ?Sized,
T: Hash + ?Sized,
pub default fn get_hash<H, B>(value: &H, build_hasher: &B) -> u64 where
B: BuildHasher,
H: Hash + ?Sized,
B: BuildHasher,
H: Hash + ?Sized,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,