@override
| 152 | protected: |
| 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 | |
| 179 | private: |
| 180 | int id_; |
nothing calls this directly
no test coverage detected