[libcxx-commits] [PATCH] D91992: [libc++] Add an extension to allow constructing std::thread from native handles

JF Bastien via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 23 14:07:00 PST 2020


jfb added a subscriber: jwakely.
jfb added a comment.

This is a sensible thing to support IMO. It's indeed weird to have native handle in other places, but not here.

What are the requirements on lifetime with this change? i.e. usually the thread owns the handle, but now it doesn't. Don't you need a bit to track "I don't own this" in the implementation? In particular, should the destructor act differently? Or is `thread` taking ownership at this point?

Check with @jwakely too, it would be better if libstdc++ had the same extension.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91992/new/

https://reviews.llvm.org/D91992



More information about the libcxx-commits mailing list