This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <atomic> | |
using namespace std::literals; | |
// compile command | |
// g++ -lpthread -std=c++14 -march=native -O3 timeTest.cpp -o timeTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <atomic> | |
using namespace std::literals; | |
// compile command | |
// g++ -lpthread -std=c++14 -march=native -O3 timeTest.cpp -o timeTest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
typedef struct { int food; } philosoper_type; | |
static inline int eat(philosoper_type *philo, int *lfork, int *rfork) { | |
int r = 0; | |
while (!r) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:io'; | |
int PORT = 5555; | |
void testconnect(){ | |
print("testconnect"); | |
Socket.connect("localhost", PORT).then((Socket sock){ | |
sock.add("hello".codeUnits); | |
}); | |
} |
NewerOlder