Skip to content

Instantly share code, notes, and snippets.

@liuchang0812
Created March 17, 2018 14:58
Show Gist options
  • Save liuchang0812/d1e9c8ac16fca3903288bfbe9428dffd to your computer and use it in GitHub Desktop.
Save liuchang0812/d1e9c8ac16fca3903288bfbe9428dffd to your computer and use it in GitHub Desktop.
seastar
➜ example git:(master) ✗ cat ex-1.cpp
#include "core/app-template.hh"
#include "core/reactor.hh"
#include <iostream>
int main(int argc, char** argv) {
seastar::app_template app;
app.run(argc, argv, [] {
std::cout << "Hello world\n";
std::cout << seastar::smp::count << "\n";
return seastar::make_ready_future<>();
});
}
➜ example git:(master) ✗ g++ `pkg-config --cflags --libs ../build/release/seastar.pc` ex-1.cpp
➜ example git:(master) ✗ ./a.out
WARN 2018-03-17 22:57:41,783 [shard 0] seastar - Unable to set SCHED_FIFO scheduling policy for timer thread; latency impact possible. Try adding CAP_SYS_NICE
Hello world
16
➜ example git:(master) ✗
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment