shan wei · Jan 26, 2021


编码中,zn “命名空间”这样跨命名空间使用操作会导致队列中具有很多 _sync:进程号,不知道这种情况是切换命名空间操作的问题还是使用的问题?对于这种跨命名空间有没有更好的应用方式? In coding, the operation of Zn "namespace" across the namespace will lead to a lot of errors in the queue_ Sync: process number. I don't know if this is a problem of switching the namespace operation or using it? Is there a better way to apply this kind of cross namespace?

1 0 2 36
Log in or sign up to continue


What is the purpose of cross namespace? If you want to modify the data in the cache database, it is recommended that you try to establish an ODBC gateway connection. This avoids the Zn problem you mentioned

When you need to switch into a new namespace for some work:

  1. Extract this work into a separate method (or methods)
  2. At the beginning of the root method switch namespaces like this:
new $namespace
set $namespace = "yourNS"

This way when you leave the method, namespace would be automatically reverted to a previous one.