WIP: working on synchronizaton between searcher thread and worker thread