[DEV][add] Add queue to Makefile
[DEV][add] Thread-safe access to queue
[DEV][fix] Return NULL if allocation fail