Search code examples
kdb

TP sends signal to subscribers from which function in Kdb+?


I know at EOD, TP sends signal to all its subscribers and call .u.eod function. However, what function in TP that sends signals to its subscribers? I would like to know. I am currently revising my CTP code and worried the signal will not be sent to its subscribers.


Solution

  • It's in .u.end, see https://github.com/KxSystems/kdb-tick/blob/master/tick/u.q#L18

    end:{(neg union/[w[;;0]])@\:(`.u.end;x)}
    

    When .u.end is triggered take the union of all subscriber handles from the .u.w dictionary and to each one send a .u.end call with x being the date that has just finished