Skip to content

sync/atomic: atomics are not implemented #1031

@imle

Description

@imle

Working off the dev branch.

I'm sure that this isn't a great pattern for microcontrollers, but I want to use io.Pipe() and there seems to be some issue importing it as noted below.

tinygo:ld.lld: error: undefined symbol: sync/atomic.LoadPointer

When I checked the lang-support page, it shows that package is supported and I was curious if this is something that is currently expected or not.

Code to reproduce.

package main

import (
	"bytes"
	"fmt"
	"io"
)

func main() {
	r, w := io.Pipe()

	go func() {
		fmt.Fprint(w, "some text to be read\n")
		w.Close()
	}()

	buf := new(bytes.Buffer)
	buf.ReadFrom(r)
	fmt.Print(buf.String())
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions