Skip to content

Commit

Permalink
Make Channel postblit / dtor scope
Browse files Browse the repository at this point in the history
This allows them to be used in scope contexts,
and to have the generated opAssign be scope.
  • Loading branch information
Geod24 committed Feb 20, 2024
1 parent 97a0c5b commit 9073996
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/vibe/core/channel.d
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ struct Channel(T, size_t buffer_size = 100) {

private shared(ChannelImpl!(T, buffer_size)) m_impl;

this(this) @safe { if (m_impl) m_impl.addRef(); }
~this() @safe { if (m_impl) m_impl.releaseRef(); }
this(this) scope @safe { if (m_impl) m_impl.addRef(); }
~this() scope @safe { if (m_impl) m_impl.releaseRef(); }

/** Determines whether there is more data to read in a single-reader scenario.
Expand Down

0 comments on commit 9073996

Please sign in to comment.