upd. I’m not sure what happened exactly (if you know, please reply), but changing TQueue to its pointer seems to resolve the issue
upd. I’m not sure what happened exactly (if you know, please reply), but changing TQueue to its pointer seems to resolve the issue