This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Make `stop_token` experimental
ClosedPublic

Authored by ldionne on Jul 7 2023, 4:03 AM.

Details

Reviewers
huixie90
ldionne
Group Reviewers
Restricted Project
Commits
rG477f6bc407db: [libc++] Make `stop_token` experimental
Summary

There are discussions about different ways of implementing stop_token to make it more performant
mark stop_token as experimental to allow us to change the design before it is shipped

Diff Detail

Event Timeline

huixie90 created this revision.Jul 7 2023, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2023, 4:03 AM
huixie90 requested review of this revision.Jul 7 2023, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 7 2023, 4:03 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne requested changes to this revision.Jul 7 2023, 4:56 AM
ldionne added a subscriber: ldionne.
ldionne added inline comments.
libcxx/include/__stop_token/stop_callback.h
23

Let's instead add something like this to __config:

#  if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
#    define _LIBCPP_HAS_NO_INCOMPLETE_STOP_TOKEN
#  endif
libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
10

Here let's introduce a specific Lit feature for it.

This revision now requires changes to proceed.Jul 7 2023, 4:56 AM
ldionne commandeered this revision.Jul 7 2023, 4:56 AM
ldionne edited reviewers, added: huixie90; removed: ldionne.

Commandeering as discussed with Hui!

I mainly glossed over the the patch.

libcxx/test/std/thread/thread.stoptoken/nostopstate/cons.default.pass.cpp
10

Please also update libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp

ldionne added inline comments.Jul 10 2023, 8:00 AM
libcxx/include/__stop_token/stop_callback.h
15

Also let's tweak the release note.

ldionne updated this revision to Diff 538651.Jul 10 2023, 8:02 AM

Address comments and rebase.

Mordante added inline comments.Jul 10 2023, 8:18 AM
libcxx/include/__stop_token/stop_callback.h
15

I already made changes in my draft update for the release notes ;-)
I still want to look whether we missed other changes, so I probably upload it later today.

ldionne marked an inline comment as done.Jul 10 2023, 9:05 AM
ldionne added inline comments.
libcxx/include/__stop_token/stop_callback.h
15

Oh, nice, thanks for having a review with updates to the release notes. This comment was actually saying that we should update the release notes to account for the fact that this is now experimental, however I realized that we didn't add stop_token to the release notes at all, so that's moot. But if you mention stop_token in your release notes update, let's mention it as being experimental.

ldionne updated this revision to Diff 538695.Jul 10 2023, 9:23 AM
ldionne marked an inline comment as done.

Fix inverted conditions and missing Lit feature.

Mordante added inline comments.Jul 10 2023, 9:42 AM
libcxx/include/__stop_token/stop_callback.h
15

That's what I already did ;-)

ldionne updated this revision to Diff 538760.Jul 10 2023, 12:12 PM
ldionne marked an inline comment as done.

Address a comment I had missed.

ldionne accepted this revision.Jul 11 2023, 5:52 AM

CI failure is a fluke, merging.

libcxx/include/__stop_token/stop_callback.h
15

Great, thanks!

This revision is now accepted and ready to land.Jul 11 2023, 5:52 AM
This revision was landed with ongoing or failed builds.Jul 11 2023, 5:52 AM
Closed by commit rG477f6bc407db: [libc++] Make `stop_token` experimental (authored by Hui, committed by ldionne). · Explain Why
This revision was automatically updated to reflect the committed changes.