Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
folly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
folly
Commits
3e05ecc2
Commit
3e05ecc2
authored
Oct 16, 2018
by
Kirk Shoop
Committed by
Facebook Github Bot
Oct 17, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merging examples (#17)
fbshipit-source-id: 0e4317ea86a60c50408cf415972bd048596ac0b2
parent
39d4be19
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
49 additions
and
43 deletions
+49
-43
folly/experimental/pushmi/examples/composition/composition_3.cpp
...xperimental/pushmi/examples/composition/composition_3.cpp
+6
-9
folly/experimental/pushmi/examples/composition/composition_4.cpp
...xperimental/pushmi/examples/composition/composition_4.cpp
+4
-7
folly/experimental/pushmi/examples/include/pool.h
folly/experimental/pushmi/examples/include/pool.h
+8
-1
folly/experimental/pushmi/examples/then_execute/then_execute_2.cpp
...erimental/pushmi/examples/then_execute/then_execute_2.cpp
+3
-6
folly/experimental/pushmi/examples/twoway_execute/twoway_execute_2.cpp
...ental/pushmi/examples/twoway_execute/twoway_execute_2.cpp
+2
-5
folly/experimental/pushmi/include/pushmi.h
folly/experimental/pushmi/include/pushmi.h
+2
-0
folly/experimental/pushmi/include/pushmi/o/defer.h
folly/experimental/pushmi/include/pushmi/o/defer.h
+12
-5
folly/experimental/pushmi/include/pushmi/o/just.h
folly/experimental/pushmi/include/pushmi/o/just.h
+2
-0
folly/experimental/pushmi/include/pushmi/o/request_via.h
folly/experimental/pushmi/include/pushmi/o/request_via.h
+5
-5
folly/experimental/pushmi/include/pushmi/o/share.h
folly/experimental/pushmi/include/pushmi/o/share.h
+5
-5
folly/experimental/pushmi/include/pushmi/subject.h
folly/experimental/pushmi/include/pushmi/subject.h
+0
-0
No files found.
folly/experimental/pushmi/examples/composition/composition_3.cpp
View file @
3e05ecc2
...
...
@@ -3,8 +3,8 @@
#include <cassert>
#include <iostream>
#include <defer.h>
#include <share.h>
#include <
pushmi/o/
defer.h>
#include <
pushmi/o/
share.h>
#include <pushmi/o/just.h>
#include <pushmi/o/tap.h>
...
...
@@ -67,6 +67,3 @@ int main()
std
::
cout
<<
"OK"
<<
std
::
endl
;
// OK
}
folly/experimental/pushmi/examples/composition/composition_4.cpp
View file @
3e05ecc2
...
...
@@ -5,7 +5,7 @@
#include <pool.h>
#include <request_via.h>
#include <
pushmi/o/
request_via.h>
#include <pushmi/o/tap.h>
#include <pushmi/o/transform.h>
...
...
@@ -43,6 +43,3 @@ int main()
std
::
cout
<<
"OK"
<<
std
::
endl
;
}
folly/experimental/pushmi/examples/include/pool.h
View file @
3e05ecc2
...
...
@@ -10,6 +10,13 @@
#include <pushmi/executor.h>
#include <pushmi/trampoline.h>
#if __cpp_deduction_guides >= 201703
#define MAKE(x) x MAKE_
#define MAKE_(...) {__VA_ARGS__}
#else
#define MAKE(x) make_ ## x
#endif
namespace
pushmi
{
using
std
::
experimental
::
static_thread_pool
;
...
...
@@ -38,7 +45,7 @@ public:
inline
auto
executor
()
{
auto
exec
=
execution
::
require
(
p
.
executor
(),
execution
::
never_blocking
,
execution
::
oneway
);
return
make_time_single_deferred
(
__pool_submit
<
decltype
(
exec
)
>
{
exec
});
return
MAKE
(
time_single_deferred
)
(
__pool_submit
<
decltype
(
exec
)
>
{
exec
});
}
inline
void
stop
()
{
p
.
stop
();}
...
...
folly/experimental/pushmi/examples/then_execute/then_execute_2.cpp
View file @
3e05ecc2
...
...
@@ -13,12 +13,10 @@
#include <pool.h>
#include <request_via.h>
#include <share.h>
#include <pushmi/deferred.h>
#include <pushmi/single_deferred.h>
#include <pushmi/o/just.h>
#include <pushmi/o/via.h>
#include <pushmi/o/transform.h>
using
namespace
pushmi
::
aliases
;
...
...
@@ -103,4 +101,3 @@ int main()
std
::
cout
<<
"OK"
<<
std
::
endl
;
}
folly/experimental/pushmi/examples/twoway_execute/twoway_execute_2.cpp
View file @
3e05ecc2
...
...
@@ -12,9 +12,6 @@
#include <pool.h>
#include <request_via.h>
#include <share.h>
#include <pushmi/deferred.h>
#include <pushmi/single_deferred.h>
#include <pushmi/o/transform.h>
...
...
folly/experimental/pushmi/include/pushmi.h
View file @
3e05ecc2
...
...
@@ -8625,6 +8625,8 @@ PUSHMI_INLINE_VAR constexpr detail::now_fn top{};
// LICENSE file in the root directory of this source tree.
//#include "../single_deferred.h"
//#include "submit.h"
//#include "extension_operators.h"
namespace
pushmi
{
...
...
folly/experimental/pushmi/
examples/include
/defer.h
→
folly/experimental/pushmi/
include/pushmi/o
/defer.h
View file @
3e05ecc2
...
...
@@ -6,9 +6,16 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include <pushmi/single.h>
#include <pushmi/o/submit.h>
#include <pushmi/o/extension_operators.h>
#include "../single.h"
#include "submit.h"
#include "extension_operators.h"
#if __cpp_deduction_guides >= 201703
#define MAKE(x) x MAKE_
#define MAKE_(...) {__VA_ARGS__}
#else
#define MAKE(x) make_ ## x
#endif
namespace
pushmi
{
...
...
@@ -17,7 +24,7 @@ namespace operators {
PUSHMI_TEMPLATE
(
class
F
)
(
requires
Invocable
<
F
>
)
auto
defer
(
F
f
)
{
return
make_single_deferred
(
return
MAKE
(
single_deferred
)
(
constrain
(
lazy
::
Receiver
<
_1
>
,
[
f
=
std
::
move
(
f
)](
auto
out
)
mutable
{
auto
sender
=
f
();
...
...
folly/experimental/pushmi/include/pushmi/o/just.h
View file @
3e05ecc2
...
...
@@ -7,6 +7,8 @@
// LICENSE file in the root directory of this source tree.
#include "../single_deferred.h"
#include "submit.h"
#include "extension_operators.h"
namespace
pushmi
{
...
...
folly/experimental/pushmi/
examples/include
/request_via.h
→
folly/experimental/pushmi/
include/pushmi/o
/request_via.h
View file @
3e05ecc2
...
...
@@ -6,10 +6,10 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include
<pushmi/single.h>
#include
<pushmi/o/submit.h>
#include
<pushmi/o/extension_operators.h>
#include
<pushmi/o/via.h>
#include
"../single.h"
#include
"submit.h"
#include
"extension_operators.h"
#include
"via.h"
namespace
pushmi
{
...
...
folly/experimental/pushmi/
examples/include
/share.h
→
folly/experimental/pushmi/
include/pushmi/o
/share.h
View file @
3e05ecc2
...
...
@@ -6,11 +6,11 @@
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#include
<pushmi/single.h>
#include
<pushmi/o/submit.h>
#include
<pushmi/o/extension_operators.h>
#include
"../single.h"
#include
"submit.h"
#include
"extension_operators.h"
#include
<subject.h>
#include
"../subject.h"
namespace
pushmi
{
...
...
folly/experimental/pushmi/
examples/include
/subject.h
→
folly/experimental/pushmi/
include/pushmi
/subject.h
View file @
3e05ecc2
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment