progschj / ThreadPool

A simple C++11 Thread Pool implementation
zlib License
7.85k stars 2.24k forks source link

VS2013: Running the example causes std::bad_function_call #41

Open pSolT opened 7 years ago

pSolT commented 7 years ago

I compiled the example.cpp using VisualStudio 2013. Running it caused a series of:

First-chance exception at 0x761C4118 in TEST.exe: Microsoft C++ exception: std::bad_function_call at memory location 0x0143F4BC.

during enqueuing tasks on a ThreadPool. Do you know what can cause the problem?

yxbh commented 7 years ago

Potentially compiler bug in VS2013. I've just tested the sample code here and it compiled and executed with no issues.

I would suggest upgrading your Visual Studio as VS2013 is now 2 versions behind the latest (VS2017).