12 #ifndef THRILL_COMMON_PORTING_HEADER 13 #define THRILL_COMMON_PORTING_HEADER 20 using ssize_t = SSIZE_T;
24 #include <system_error> 43 template <
typename... Args>
49 return std::thread(std::forward<Args>(args) ...);
51 catch (std::system_error&) {
53 LOG1 <<
"Thread creation failed, retrying.";
54 std::this_thread::sleep_for(std::chrono::milliseconds(100));
74 #endif // !THRILL_COMMON_PORTING_HEADER std::thread CreateThread(Args &&... args)
create a std::thread and repeat creation if it fails
void LogCmdlineParams(JsonLogger &logger)
void PortSetCloseOnExec(int fd)
set FD_CLOEXEC on file descriptor (if possible)
void MakePipe(int out_pipefds[2])
create a pair of pipe file descriptors
std::string GetHostname()
get hostname
struct dirent * ts_readdir(DIR *dirp)
mutex-locked readdir() call
std::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
void SetCpuAffinity(std::thread &thread, size_t cpu_id)
set cpu/core affinity of a thread