2019-04-05 14:14:19 -07:00
|
|
|
#![stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
|
2019-04-15 11:23:21 +09:00
|
|
|
use crate::fmt;
|
|
|
|
use crate::marker::{PhantomData, Unpin};
|
2019-01-29 19:02:42 -08:00
|
|
|
|
2019-02-03 12:59:51 -08:00
|
|
|
/// A `RawWaker` allows the implementor of a task executor to create a [`Waker`]
|
2019-01-29 19:02:42 -08:00
|
|
|
/// which provides customized wakeup behavior.
|
|
|
|
///
|
2019-02-03 12:30:34 -08:00
|
|
|
/// [vtable]: https://en.wikipedia.org/wiki/Virtual_method_table
|
|
|
|
///
|
|
|
|
/// It consists of a data pointer and a [virtual function pointer table (vtable)][vtable] that
|
2019-01-29 19:02:42 -08:00
|
|
|
/// customizes the behavior of the `RawWaker`.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`Waker`]: struct.Waker.html
|
2019-02-03 12:59:51 -08:00
|
|
|
#[derive(PartialEq, Debug)]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-01-29 19:02:42 -08:00
|
|
|
pub struct RawWaker {
|
|
|
|
/// A data pointer, which can be used to store arbitrary data as required
|
|
|
|
/// by the executor. This could be e.g. a type-erased pointer to an `Arc`
|
|
|
|
/// that is associated with the task.
|
|
|
|
/// The value of this field gets passed to all functions that are part of
|
2019-02-03 12:30:34 -08:00
|
|
|
/// the vtable as the first parameter.
|
2019-02-06 22:56:33 -08:00
|
|
|
data: *const (),
|
2019-01-29 19:02:42 -08:00
|
|
|
/// Virtual function pointer table that customizes the behavior of this waker.
|
2019-02-06 22:56:33 -08:00
|
|
|
vtable: &'static RawWakerVTable,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl RawWaker {
|
|
|
|
/// Creates a new `RawWaker` from the provided `data` pointer and `vtable`.
|
|
|
|
///
|
|
|
|
/// The `data` pointer can be used to store arbitrary data as required
|
|
|
|
/// by the executor. This could be e.g. a type-erased pointer to an `Arc`
|
|
|
|
/// that is associated with the task.
|
2019-07-15 10:03:53 -05:00
|
|
|
/// The value of this pointer will get passed to all functions that are part
|
2019-02-06 22:56:33 -08:00
|
|
|
/// of the `vtable` as the first parameter.
|
|
|
|
///
|
|
|
|
/// The `vtable` customizes the behavior of a `Waker` which gets created
|
|
|
|
/// from a `RawWaker`. For each operation on the `Waker`, the associated
|
|
|
|
/// function in the `vtable` of the underlying `RawWaker` will be called.
|
2020-07-26 00:00:00 +00:00
|
|
|
#[inline]
|
2019-03-11 16:56:00 -07:00
|
|
|
#[rustc_promotable]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-12-18 12:00:59 -05:00
|
|
|
#[rustc_const_stable(feature = "futures_api", since = "1.36.0")]
|
2019-02-06 22:56:33 -08:00
|
|
|
pub const fn new(data: *const (), vtable: &'static RawWakerVTable) -> RawWaker {
|
2019-11-24 01:43:32 -08:00
|
|
|
RawWaker { data, vtable }
|
2019-02-06 22:56:33 -08:00
|
|
|
}
|
2019-01-29 19:02:42 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
/// A virtual function pointer table (vtable) that specifies the behavior
|
2019-02-03 12:30:34 -08:00
|
|
|
/// of a [`RawWaker`].
|
2019-01-29 19:02:42 -08:00
|
|
|
///
|
|
|
|
/// The pointer passed to all functions inside the vtable is the `data` pointer
|
2019-02-03 12:59:51 -08:00
|
|
|
/// from the enclosing [`RawWaker`] object.
|
2019-02-05 01:30:00 -08:00
|
|
|
///
|
|
|
|
/// The functions inside this struct are only intended be called on the `data`
|
|
|
|
/// pointer of a properly constructed [`RawWaker`] object from inside the
|
|
|
|
/// [`RawWaker`] implementation. Calling one of the contained functions using
|
|
|
|
/// any other `data` pointer will cause undefined behavior.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-02-03 12:59:51 -08:00
|
|
|
#[derive(PartialEq, Copy, Clone, Debug)]
|
2019-01-29 19:02:42 -08:00
|
|
|
pub struct RawWakerVTable {
|
2019-02-03 12:59:51 -08:00
|
|
|
/// This function will be called when the [`RawWaker`] gets cloned, e.g. when
|
|
|
|
/// the [`Waker`] in which the [`RawWaker`] is stored gets cloned.
|
2019-01-29 19:02:42 -08:00
|
|
|
///
|
|
|
|
/// The implementation of this function must retain all resources that are
|
2019-02-03 12:59:51 -08:00
|
|
|
/// required for this additional instance of a [`RawWaker`] and associated
|
|
|
|
/// task. Calling `wake` on the resulting [`RawWaker`] should result in a wakeup
|
|
|
|
/// of the same task that would have been awoken by the original [`RawWaker`].
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`Waker`]: struct.Waker.html
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-03-11 16:56:00 -07:00
|
|
|
clone: unsafe fn(*const ()) -> RawWaker,
|
2019-01-29 19:02:42 -08:00
|
|
|
|
2019-02-03 12:59:51 -08:00
|
|
|
/// This function will be called when `wake` is called on the [`Waker`].
|
|
|
|
/// It must wake up the task associated with this [`RawWaker`].
|
2019-02-05 01:14:09 -08:00
|
|
|
///
|
2019-04-05 11:46:30 -07:00
|
|
|
/// The implementation of this function must make sure to release any
|
|
|
|
/// resources that are associated with this instance of a [`RawWaker`] and
|
|
|
|
/// associated task.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`Waker`]: struct.Waker.html
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-03-11 16:56:00 -07:00
|
|
|
wake: unsafe fn(*const ()),
|
|
|
|
|
2019-04-05 11:46:30 -07:00
|
|
|
/// This function will be called when `wake_by_ref` is called on the [`Waker`].
|
|
|
|
/// It must wake up the task associated with this [`RawWaker`].
|
|
|
|
///
|
|
|
|
/// This function is similar to `wake`, but must not consume the provided data
|
|
|
|
/// pointer.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`Waker`]: struct.Waker.html
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-04-05 11:46:30 -07:00
|
|
|
wake_by_ref: unsafe fn(*const ()),
|
|
|
|
|
2019-03-11 16:56:00 -07:00
|
|
|
/// This function gets called when a [`RawWaker`] gets dropped.
|
|
|
|
///
|
|
|
|
/// The implementation of this function must make sure to release any
|
|
|
|
/// resources that are associated with this instance of a [`RawWaker`] and
|
|
|
|
/// associated task.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-03-11 16:56:00 -07:00
|
|
|
drop: unsafe fn(*const ()),
|
|
|
|
}
|
2019-01-29 19:02:42 -08:00
|
|
|
|
2019-03-11 16:56:00 -07:00
|
|
|
impl RawWakerVTable {
|
2019-04-05 11:46:30 -07:00
|
|
|
/// Creates a new `RawWakerVTable` from the provided `clone`, `wake`,
|
|
|
|
/// `wake_by_ref`, and `drop` functions.
|
2019-03-11 16:56:00 -07:00
|
|
|
///
|
|
|
|
/// # `clone`
|
|
|
|
///
|
|
|
|
/// This function will be called when the [`RawWaker`] gets cloned, e.g. when
|
|
|
|
/// the [`Waker`] in which the [`RawWaker`] is stored gets cloned.
|
|
|
|
///
|
|
|
|
/// The implementation of this function must retain all resources that are
|
|
|
|
/// required for this additional instance of a [`RawWaker`] and associated
|
|
|
|
/// task. Calling `wake` on the resulting [`RawWaker`] should result in a wakeup
|
|
|
|
/// of the same task that would have been awoken by the original [`RawWaker`].
|
|
|
|
///
|
|
|
|
/// # `wake`
|
|
|
|
///
|
|
|
|
/// This function will be called when `wake` is called on the [`Waker`].
|
|
|
|
/// It must wake up the task associated with this [`RawWaker`].
|
|
|
|
///
|
2019-04-05 11:46:30 -07:00
|
|
|
/// The implementation of this function must make sure to release any
|
|
|
|
/// resources that are associated with this instance of a [`RawWaker`] and
|
|
|
|
/// associated task.
|
|
|
|
///
|
|
|
|
/// # `wake_by_ref`
|
|
|
|
///
|
|
|
|
/// This function will be called when `wake_by_ref` is called on the [`Waker`].
|
|
|
|
/// It must wake up the task associated with this [`RawWaker`].
|
|
|
|
///
|
|
|
|
/// This function is similar to `wake`, but must not consume the provided data
|
2019-03-11 16:56:00 -07:00
|
|
|
/// pointer.
|
|
|
|
///
|
|
|
|
/// # `drop`
|
|
|
|
///
|
2019-02-03 12:59:51 -08:00
|
|
|
/// This function gets called when a [`RawWaker`] gets dropped.
|
2019-01-29 19:02:42 -08:00
|
|
|
///
|
|
|
|
/// The implementation of this function must make sure to release any
|
2019-02-03 12:59:51 -08:00
|
|
|
/// resources that are associated with this instance of a [`RawWaker`] and
|
2019-01-29 19:02:42 -08:00
|
|
|
/// associated task.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`Waker`]: struct.Waker.html
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2019-03-11 16:56:00 -07:00
|
|
|
#[rustc_promotable]
|
2019-05-23 12:27:58 +02:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-04-05 14:14:19 -07:00
|
|
|
// `rustc_allow_const_fn_ptr` is a hack that should not be used anywhere else
|
|
|
|
// without first consulting with T-Lang.
|
|
|
|
//
|
|
|
|
// FIXME: remove whenever we have a stable way to accept fn pointers from const fn
|
|
|
|
// (see https://github.com/rust-rfcs/const-eval/issues/19#issuecomment-472799062)
|
2019-05-23 12:27:58 +02:00
|
|
|
#[rustc_allow_const_fn_ptr]
|
2019-12-18 12:00:59 -05:00
|
|
|
#[rustc_const_stable(feature = "futures_api", since = "1.36.0")]
|
2019-03-11 16:56:00 -07:00
|
|
|
pub const fn new(
|
|
|
|
clone: unsafe fn(*const ()) -> RawWaker,
|
|
|
|
wake: unsafe fn(*const ()),
|
2019-04-05 11:46:30 -07:00
|
|
|
wake_by_ref: unsafe fn(*const ()),
|
2019-03-11 16:56:00 -07:00
|
|
|
drop: unsafe fn(*const ()),
|
|
|
|
) -> Self {
|
2019-11-24 01:43:32 -08:00
|
|
|
Self { clone, wake, wake_by_ref, drop }
|
2019-03-11 16:56:00 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The `Context` of an asynchronous task.
|
|
|
|
///
|
|
|
|
/// Currently, `Context` only serves to provide access to a `&Waker`
|
|
|
|
/// which can be used to wake the current task.
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-03-11 16:56:00 -07:00
|
|
|
pub struct Context<'a> {
|
|
|
|
waker: &'a Waker,
|
|
|
|
// Ensure we future-proof against variance changes by forcing
|
|
|
|
// the lifetime to be invariant (argument-position lifetimes
|
|
|
|
// are contravariant while return-position lifetimes are
|
|
|
|
// covariant).
|
|
|
|
_marker: PhantomData<fn(&'a ()) -> &'a ()>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Context<'a> {
|
|
|
|
/// Create a new `Context` from a `&Waker`.
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
|
|
|
pub fn from_waker(waker: &'a Waker) -> Self {
|
2019-11-24 01:43:32 -08:00
|
|
|
Context { waker, _marker: PhantomData }
|
2019-03-11 16:56:00 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Returns a reference to the `Waker` for the current task.
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
|
|
|
pub fn waker(&self) -> &'a Waker {
|
|
|
|
&self.waker
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-03-11 16:56:00 -07:00
|
|
|
impl fmt::Debug for Context<'_> {
|
2019-04-19 01:37:12 +02:00
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
2019-11-24 01:43:32 -08:00
|
|
|
f.debug_struct("Context").field("waker", &self.waker).finish()
|
2019-03-11 16:56:00 -07:00
|
|
|
}
|
2019-01-29 19:02:42 -08:00
|
|
|
}
|
2018-06-08 16:45:27 -04:00
|
|
|
|
2018-05-30 18:23:10 -07:00
|
|
|
/// A `Waker` is a handle for waking up a task by notifying its executor that it
|
|
|
|
/// is ready to be run.
|
|
|
|
///
|
2019-02-03 12:59:51 -08:00
|
|
|
/// This handle encapsulates a [`RawWaker`] instance, which defines the
|
2019-01-29 19:02:42 -08:00
|
|
|
/// executor-specific wakeup behavior.
|
|
|
|
///
|
2019-10-12 15:18:17 +02:00
|
|
|
/// Implements [`Clone`], [`Send`], and [`Sync`].
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
2018-05-30 18:23:10 -07:00
|
|
|
#[repr(transparent)]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
pub struct Waker {
|
2019-01-29 19:02:42 -08:00
|
|
|
waker: RawWaker,
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
|
|
|
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-06-29 19:33:16 -07:00
|
|
|
impl Unpin for Waker {}
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
unsafe impl Send for Waker {}
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
unsafe impl Sync for Waker {}
|
|
|
|
|
|
|
|
impl Waker {
|
|
|
|
/// Wake up the task associated with this `Waker`.
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-04-05 11:46:30 -07:00
|
|
|
pub fn wake(self) {
|
2019-01-29 19:02:42 -08:00
|
|
|
// The actual wakeup call is delegated through a virtual function call
|
|
|
|
// to the implementation which is defined by the executor.
|
2019-04-05 11:46:30 -07:00
|
|
|
let wake = self.waker.vtable.wake;
|
|
|
|
let data = self.waker.data;
|
|
|
|
|
|
|
|
// Don't call `drop` -- the waker will be consumed by `wake`.
|
|
|
|
crate::mem::forget(self);
|
2019-02-03 12:59:51 -08:00
|
|
|
|
2019-04-05 11:49:46 -07:00
|
|
|
// SAFETY: This is safe because `Waker::from_raw` is the only way
|
2019-02-03 12:59:51 -08:00
|
|
|
// to initialize `wake` and `data` requiring the user to acknowledge
|
|
|
|
// that the contract of `RawWaker` is upheld.
|
2019-04-05 11:46:30 -07:00
|
|
|
unsafe { (wake)(data) };
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Wake up the task associated with this `Waker` without consuming the `Waker`.
|
|
|
|
///
|
|
|
|
/// This is similar to `wake`, but may be slightly less efficient in the case
|
|
|
|
/// where an owned `Waker` is available. This method should be preferred to
|
|
|
|
/// calling `waker.clone().wake()`.
|
|
|
|
#[inline]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-04-05 11:46:30 -07:00
|
|
|
pub fn wake_by_ref(&self) {
|
|
|
|
// The actual wakeup call is delegated through a virtual function call
|
|
|
|
// to the implementation which is defined by the executor.
|
|
|
|
|
|
|
|
// SAFETY: see `wake`
|
|
|
|
unsafe { (self.waker.vtable.wake_by_ref)(self.waker.data) }
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
|
|
|
|
2019-02-09 22:16:58 +00:00
|
|
|
/// Returns `true` if this `Waker` and another `Waker` have awoken the same task.
|
2018-05-30 18:23:10 -07:00
|
|
|
///
|
|
|
|
/// This function works on a best-effort basis, and may return false even
|
|
|
|
/// when the `Waker`s would awaken the same task. However, if this function
|
2019-01-29 19:02:42 -08:00
|
|
|
/// returns `true`, it is guaranteed that the `Waker`s will awaken the same task.
|
2018-05-30 18:23:10 -07:00
|
|
|
///
|
|
|
|
/// This function is primarily used for optimization purposes.
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
pub fn will_wake(&self, other: &Waker) -> bool {
|
2019-01-29 19:02:42 -08:00
|
|
|
self.waker == other.waker
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
2018-10-01 15:16:06 -07:00
|
|
|
|
2019-02-03 12:59:51 -08:00
|
|
|
/// Creates a new `Waker` from [`RawWaker`].
|
2018-10-01 15:16:06 -07:00
|
|
|
///
|
2019-02-03 12:59:51 -08:00
|
|
|
/// The behavior of the returned `Waker` is undefined if the contract defined
|
2019-02-06 22:56:33 -08:00
|
|
|
/// in [`RawWaker`]'s and [`RawWakerVTable`]'s documentation is not upheld.
|
|
|
|
/// Therefore this method is unsafe.
|
2019-05-04 23:48:57 +09:00
|
|
|
///
|
|
|
|
/// [`RawWaker`]: struct.RawWaker.html
|
|
|
|
/// [`RawWakerVTable`]: struct.RawWakerVTable.html
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-04-05 11:49:46 -07:00
|
|
|
pub unsafe fn from_raw(waker: RawWaker) -> Waker {
|
2019-11-24 01:43:32 -08:00
|
|
|
Waker { waker }
|
2018-10-01 15:16:06 -07:00
|
|
|
}
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
|
|
|
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
impl Clone for Waker {
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
2018-05-30 18:23:10 -07:00
|
|
|
fn clone(&self) -> Self {
|
2019-01-29 19:02:42 -08:00
|
|
|
Waker {
|
2019-04-05 11:49:46 -07:00
|
|
|
// SAFETY: This is safe because `Waker::from_raw` is the only way
|
2019-02-03 12:59:51 -08:00
|
|
|
// to initialize `clone` and `data` requiring the user to acknowledge
|
|
|
|
// that the contract of [`RawWaker`] is upheld.
|
2019-01-29 19:02:42 -08:00
|
|
|
waker: unsafe { (self.waker.vtable.clone)(self.waker.data) },
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2018-05-30 18:23:10 -07:00
|
|
|
impl Drop for Waker {
|
2019-03-11 16:56:00 -07:00
|
|
|
#[inline]
|
2018-05-30 18:23:10 -07:00
|
|
|
fn drop(&mut self) {
|
2019-04-05 11:49:46 -07:00
|
|
|
// SAFETY: This is safe because `Waker::from_raw` is the only way
|
2019-02-03 12:59:51 -08:00
|
|
|
// to initialize `drop` and `data` requiring the user to acknowledge
|
|
|
|
// that the contract of `RawWaker` is upheld.
|
|
|
|
unsafe { (self.waker.vtable.drop)(self.waker.data) }
|
2018-05-30 18:23:10 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-04-05 14:14:19 -07:00
|
|
|
#[stable(feature = "futures_api", since = "1.36.0")]
|
2019-01-29 19:02:42 -08:00
|
|
|
impl fmt::Debug for Waker {
|
2019-04-19 01:37:12 +02:00
|
|
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
2019-02-05 01:14:09 -08:00
|
|
|
let vtable_ptr = self.waker.vtable as *const RawWakerVTable;
|
2019-01-29 19:02:42 -08:00
|
|
|
f.debug_struct("Waker")
|
2019-02-05 01:14:09 -08:00
|
|
|
.field("data", &self.waker.data)
|
|
|
|
.field("vtable", &vtable_ptr)
|
2018-05-30 18:23:10 -07:00
|
|
|
.finish()
|
|
|
|
}
|
|
|
|
}
|