esp8266 / esp8266/Arduino

std::mutex is not available

Open
#8,882 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

### Basic Infos

- [X] This issue complies with the [issue POLICY doc](https://github.com/esp8266/Arduino/blob/master/POLICY.md).
- [X] I have read the documentation at [readthedocs](https://arduino-esp8266.readthedocs.io/en/latest) and the issue is not addressed there.
- [X] I have tested that the issue is present in current master branch (aka latest git).
- [X] I have searched the issue tracker for a similar issue.
- [X] If there is a stack dump, I have decoded it.
- [X] I have filled out all fields below.

#### Platform

- Hardware: ESP-12F
- Core Version: PIO Core 6.1.6
- Development Env: PlatformIO
- Operating System: Windows

### Settings in IDE

- Module: WeMos D1 R2 and mini /
- Flash Mode: dio
- Flash Size: 4MB
- lwip Variant: v1.4
- Reset Method: ck
- Flash Frequency: [40Mhz]
- CPU Frequency: 80Mhz
- Upload Using: SERIAL
- Upload Speed: 115200

### Problem Description

std::mutex is not available. Have set up a Win10 VM and fresh installed VS Code and PIO to ensure it is not related to one of my libraries or such. Still persists.

### [MCVE](https://stackoverflow.com/help/mcve) Sketch

main.cpp:
```
#include

#include

using std::mutex;

void setup() {}

void loop() {}
```

platformio.ini:
```
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
```

### Output

```
src\main.cpp:5:12: error: 'mutex' has not been declared in 'std'
5 | using std::mutex;
| ^~~~~
*** [.pio\build\d1_mini\src\main.cpp.o] Error 1
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.