我在Kubuntu 12.04上,在通过apt-get(mysql ver:5.5.35)安装mysql之后,我正在尝试启动mysql服务,但是我收到了这个错误:
sudo服务mysql启动
开始:作业无法启动
所以我用Google搜索了这个问题,它说我必须转到/var/log/mysql/error.log
但是我的error.log文件是空的:(
然后我检查了权限:
drwxr -s --- 2 mysql adm 4096 Apr 7 11:21 mysql
-rw-r ----- 1 mysql adm 0 Apr 7 11:21 error.log
所以我不知道该怎么办......为什么会出现这个错误?为什么错误文件为空?
我正在使用c ++ 11上的线程库来做一些事情.问题是我的线程数量有限(4).
我会知道如何处理它:
#include <iostream>
#include <string>
#include <vector>
#include <thread>
#define NUMBER_OF_THREADS 4
void foo(const std::string& astring)
{
std::cout << astring << std::endl;
}
int main()
{
std::vector<std::string> list_of_strings(100);
// values assigned
std::vector<std::thread> list_of_threads(NUMBER_OF_THREADS);
for(std::vector<std::string>::const_iterator it_string = list_of_strings.begin() ; it_string != list_of_strings.end() ; ++it_string)
{
bool check = false;
unsigned int = 0;
while(!check) // loop which assigns the next task to the first thread ready.
{
if( check = list_of_threads.at(i).ISFREE()) // how to do ?
{
list_of_threads.at(i) …Run Code Online (Sandbox Code Playgroud)