This page answers questions I have gotten from developers.
(Q) When I try to call txThread::yield() within a function called by a
timer event my program segfaults. I have tried to find out why but I have not
found the cause yet.
(A) txObject ATK does not allow this. I used to force a crash and print
out a message saying this was not allowed. The reason for not allowing yields in
timer & io callbacks is because the IO/Timer thread is the driving force for
all other threads, and if it is put to sleep the whole system will stop. Future
documentation will call this out and I will/should put the print out back in.
This has been addressed in txObject 1.3.6 (or higher). Print out has been put back
(Q) I have trouble understanding txObject ATK memory management.
Sometimes it takes some time to figure out whether a method frees a
pointer it is given as an argument or whether it leaves that up to the caller.
(A) Yes I know I know, documentation will most certainly answer these
types of questions. Hopefully someday in the future I will get time to write an
exhaustive tutorial. But in the meantime here are two rules that certainly will
help.
If a method signature takes a const then the object does not own the memory,
if it takes non-const it does. Same goes for method signatures returning const
or non-const.
(Q) When I compile with both HOME_THREAD_SUPPORT and NATIVE_THREAD_SUPPORT flags
to use both txObject ATK's Home Grown and Native abstraction thread layer, it
works fine on Solaris & Windows, but on Linux my application faults.
(A) I too have had this problem on Linux. It seems that pthreads do not
like to have another switching engine running. When I have time I will look
into this. For now, use one or the other by turning on/off NATIVE_THREAD_SUPPORT &
HOME_THREAD_SUPPORT flags.
(Q) I am having trouble using txObject ATK sockets on Windows 2000. But
on Windows NT/XP it works fine. I find that running UDP sockets will throw
txObject ATK select loop thread into a spin loop. Any thoughts?
(A) Windows 2000 has a UDP socket select bug where if one sends to a
peer and the peer is not there the socket goes errored. Build with compile file
WIN2K_UDP_FIX and get Window 2000 patch q263823 from txObject ATK download page
or from microsoft.
(Q) Using txObject ATK with ObjectStore 5.1 works fine for all of
txObject containers, but I am having problems using txHashTable & txHashMap
with ObjectStore 6.0 and higher.
(A) It turns out that ObjectStore 6.0 and higher went through a
complete architectural overhaul. While doing so they forced a new behavior
which previous releases did not. Excelon Corp. says they will remove this
restriction in future releases, but until that I suggest you continue your
use of ObjectStore 5.1.
OSTORE 6.0 fix has been add to txObject 1.3.6 (or higher) to get around 6.0's
limitations
txObject © 2007, All Rights Reserved