怎么获取已经订阅的subscriptions并取消

All subscriptions to the shared stream table [stream_futures] must be cancelled before it can be dropped.,不记得有哪些subscriptions了,怎么获取已经订阅的subscriptions,并取消呀

请先 登录 后评论

1 个回答

wfHuang

可以参考这篇文档 https://gitee.com/dolphindb/DolphinDBModules/tree/master/ops#38-unsubscribeall- 

语法:unsubscribeAll()

详情:取消当前节点上的所有订阅。

例子

share streamTable(10:0, `id`val, [INT, INT]) as st
t = table(10:0, `id`val, [INT, INT])
subscribeTable(tableName=`st, actionName=`sub_st, handler=append!{t})
undef(st, SHARED)
#error
All subscriptions to the shared stream table [st] must be cancelled before it can be undefined.

unsubscribeAll()
undef(st, SHARED)



请先 登录 后评论
  • 1 关注
  • 0 收藏,270 浏览
  • hmWei 提出于 2024-01-12 15:35

相似问题