proxygen
FibersTestApp.cpp File Reference
#include <iostream>
#include <queue>
#include <folly/Memory.h>
#include <folly/fibers/FiberManager.h>
#include <folly/fibers/SimpleLoopController.h>

Go to the source code of this file.

Classes

struct  Application
 

Functions

int main ()
 

Function Documentation

int main ( void  )

Definition at line 80 of file FibersTestApp.cpp.

References Application::fiberManager, Application::loop(), loop(), folly::fibers::SimpleLoopController::loop(), folly::fibers::FiberManager::loopController(), and folly::gen::move.

80  {
81  Application app;
82 
83  auto loop = [&app]() { app.loop(); };
84 
85  auto& loopController =
86  dynamic_cast<SimpleLoopController&>(app.fiberManager.loopController());
87 
88  loopController.loop(std::move(loop));
89 
90  return 0;
91 }
FiberManager fiberManager
constexpr detail::Map< Move > move
Definition: Base-inl.h:2567
LoopController & loopController()
void loop(int iters)