Exemplo n.º 1
0
Arquivo: main.cpp Projeto: CCJY/coliru
int main() {
    std::string str = "abc";

    auto res1 = spawn_task(func_string, str);
    res1.get();
    std::cout << str << "\n";
    
    auto res2 = spawn_task( func_string, std::move(str) );
    res2.get();
    std::cout << str << "\n";
    
    auto res3 = spawn_task(func_int, 10);
    res3.get();
}
Exemplo n.º 2
0
int main()
{
	char buf[BUFSIZE];
	int fnp;
	
	puts("Frosk run shell.");
	newline();

	while (1) {
		puts("> ");
		gets(buf, BUFSIZE);

		fnp = get_fst_node_ptr(buf);
		
		if (fnp != 0) {
			spawn_task(fnp);
		} else {
			puts("Cannot execute file");
			newline();
		}
	}
		
	return 0;
}