# JoinHandle

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-system/task/struct-joinhandle/

**struct** · [`ferroui-system`](/docs/0.5.0/api/ferroui-system/) · v0.5.0

```rust
struct JoinHandle<T>
```

The handle of a spawned task (`spawn_local`,
`spawn_local_on`): a future of its outcome, the output of its future
or a [`JoinError`](/docs/0.5.0/api/ferroui-system/task/enum-joinerror/).

Dropping the handle detaches the task, which keeps running. The handle is `Send` when the
output is: it may be awaited or aborted from another thread, while the task runs on its own.
It has one owner; `shared` makes a handle for several observers.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L226)

## Members

- [`is_finished`](#function-is_finished)
- [`id`](#function-id)
- [`abort_handle`](#function-abort_handle)
- [`abort`](#function-abort)
- [`shared`](#function-shared)

<a id="function-is_finished"></a>

### is_finished

```rust
fn is_finished(self: &Self) -> bool
```

Whether the task has ended, in any way.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L237)

<a id="function-id"></a>

### id

```rust
fn id(self: &Self) -> Id
```

The id of the task.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L242)

<a id="function-abort_handle"></a>

### abort_handle

```rust
fn abort_handle(self: &Self) -> AbortHandle
```

A handle that aborts the task, for other owners than the one of the outcome.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L247)

<a id="function-abort"></a>

### abort

```rust
fn abort(self: &Self)
```

Aborts the task: its future is dropped and the outcome is `JoinError::Canceled`, unless
it has ended. On the task's thread the future is dropped at once (when the task is being
polled, right after that poll); from another thread, when the task's thread polls it next
(its schedule, or `run_pending` for the queue of the thread).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L255)

<a id="function-shared"></a>

### shared

```rust
fn shared(self: Self) -> Shared<T>
where T: Clone + 'static
```

The outcome of the task for several observers, on the current thread: see `Shared`.
## Panics
When the handle has given the outcome already (it was polled to the end).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.System/task/join.rs#L270)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `IntoFuture`
- `Future`
- `Debug`

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
