Changeset 180 in code


Ignore:
Timestamp:
Mar 27, 2020, 11:54:42 PM (5 years ago)
Author:
contact
Message:

Document functions safe to call from any goroutine

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r179 r180  
    307307}
    308308
     309// Close closes the connection. It is safe to call from any goroutine.
    309310func (dc *downstreamConn) Close() error {
    310311        if dc.isClosed() {
    311312                return fmt.Errorf("downstream connection already closed")
    312313        }
    313 
    314314        close(dc.closed)
    315315        return nil
    316316}
    317317
     318// SendMessage queues a new outgoing message. It is safe to call from any
     319// goroutine.
    318320func (dc *downstreamConn) SendMessage(msg *irc.Message) {
    319321        dc.outgoing <- msg
  • trunk/upstream.go

    r179 r180  
    146146}
    147147
     148// Close closes the connection. It is safe to call from any goroutine.
    148149func (uc *upstreamConn) Close() error {
    149150        if uc.isClosed() {
     
    13921393}
    13931394
     1395// SendMessage queues a new outgoing message. It is safe to call from any
     1396// goroutine.
    13941397func (uc *upstreamConn) SendMessage(msg *irc.Message) {
    13951398        uc.outgoing <- msg
Note: See TracChangeset for help on using the changeset viewer.