Re:what does UCLO means exactly?

  • From: home_king <home_king@xxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 2 Apr 2015 22:32:26 +0800 (CST)

It seems that the timer closure refers to the self as upvalue.


At 2015-04-02 21:49:28, "home_king" <home_king@xxxxxxx> wrote:

Hi,

Here is a function:
function tcp_mt.__index.receive(self, pattern, extra)
if self.closed then return nil, "closed" end

if self.reading then return nil,"socket busy reading" end
self.reading = true

self.rtimedout = false
if self.timeout and self.timeout > 0 then
self.rtimer = timer.add_timer(function()
self.rtimedout = true
if self[YIELD_R] then
coroutine.resume(self[YIELD_R])
end
end, self.timeout)
end

local r,err,partial = receive_ll(self, pattern, extra)

if self.rtimer then
self.rtimer:cancel()
self.rtimer = nil
end

self.reading = false
return r,err,partial
end

The -jv shows that all return statements are UCLO NYI.
But it seems that I do not use upvalues there. So what does the UCLO means
exactly?

Regards,
Jinhua Luo



Other related posts: