MCPcopy Create free account
hub / github.com/acl-dev/acl / run

Method run

lib_fiber/samples-c++/pgsql/main.cpp:154–177  ·  view source on GitHub ↗

@override

Source from the content-addressed store, hash-verified

152protected:
153 // @override
154 void run(void)
155 {
156// printf("fiber-%d-%d running\r\n", get_id(), acl::fiber::self());
157 acl_fiber_delay(10);
158
159 pgsql_oper dboper(dbp_, id_);
160
161 if (oper_.equal("add", false))
162 dboper.pgsql_add(count_);
163 else if (oper_.equal("get", false))
164 dboper.pgsql_get(count_);
165 else
166 printf("unknown command: %s\r\n", oper_.c_str());
167
168 delete this;
169
170 printf("----__cur_fibers: %d----\r\n", __cur_fibers);
171
172 if (--__cur_fibers == 0)
173 {
174 printf("All fibers Over\r\n");
175 acl::fiber::schedule_stop();
176 }
177 }
178
179private:
180 int id_;

Callers

nothing calls this directly

Calls 5

equalMethod · 0.80
pgsql_addMethod · 0.80
pgsql_getMethod · 0.80
acl_fiber_delayFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected