working thread with pipe IPC. for now only one way comunication is enabled