Skip to content

bugfix: When the fn function is executed, causing panic will cause the key to remain permanently. This leads to a series of problems. #139

Open
@liqingqiya

Description

@liqingqiya

When the fn function is executed, causing panic will cause the key to remain permanently. This leads to a series of problems.

goroutine 1

	Group.Do 
		// add 
		g.m[key] = c

		// execute fn()
		c.val, c.err = fn()  // panic;

		// delete key
		delete(g.m, key)

goroutine 2

	Group.Do 
		// lookup  
		if c, ok := g.m[key]; ok {
			g.mu.Unlock()
			c.wg.Wait()			// wait forever
			return

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions