在使用FlashDB软件包时,利用其中的遍历函数进行操作时,ps命令查看线程运行情况,包含flashDB的线程提示error -2。
线程创建设置如下:
/* 创建 线程 */
rt_thread_t tsdb_initial_thread = rt_thread_create("tsdb_ini", tsdb_initial_thread_entry, RT_NULL, 6*1024, 23, 10);
tsdb使能如下:
fdb_tsdb_init(&tsdb, “db”, “flashDB”, get_time, 32, NULL);
/ QUERY the TSDB /
/* query all TSL in TSDB by iterator
- & send the status of FDB_TSL_WRITE to the server via serial 4
- & change the status of FDB_TSL_WRITE to FDB_TSL_USER_STATUS1*/
fdb_tsl_iter(&tsdb, query_cb, &tsdb);
问题如下:
1、error -2 超时有啥影响;
2、像flashDB这种需要遍历的操作耗时比较长,如何设置相关的参数。