Skip to content

Commit

Permalink
added noinline ot channel functions when compiling for windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
klemens-morgenstern committed Jul 2, 2024
1 parent 9149b53 commit f349afa
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions include/boost/cobalt/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,37 @@ struct channel
boost::intrusive::list<write_op, intrusive::constant_time_size<false> > write_queue_;
public:
read_op read(const boost::source_location & loc = BOOST_CURRENT_LOCATION) {return read_op{{}, this, loc}; }

#if defined(BOOST_WINDOWS_API)
BOOST_NOINLINE
#endif
write_op write(const T && value, const boost::source_location & loc = BOOST_CURRENT_LOCATION)
requires std::is_copy_constructible_v<T>
{
return write_op{{}, this, &value, loc};
}

#if defined(BOOST_WINDOWS_API)
BOOST_NOINLINE
#endif
write_op write(const T & value, const boost::source_location & loc = BOOST_CURRENT_LOCATION)
requires std::is_copy_constructible_v<T>
{
return write_op{{}, this, &value, loc};
}


#if defined(BOOST_WINDOWS_API)
BOOST_NOINLINE
#endif
write_op write( T && value, const boost::source_location & loc = BOOST_CURRENT_LOCATION)
{
return write_op{{}, this, &value, loc};
}

#if defined(BOOST_WINDOWS_API)
BOOST_NOINLINE
#endif
write_op write( T & value, const boost::source_location & loc = BOOST_CURRENT_LOCATION)
{
return write_op{{}, this, &value, loc};
Expand Down

0 comments on commit f349afa

Please sign in to comment.