Skip to content

Module4 added#51

Merged
ziobron merged 13 commits intocoders-school:masterfrom
dawidbil:module4
Jan 28, 2021
Merged

Module4 added#51
ziobron merged 13 commits intocoders-school:masterfrom
dawidbil:module4

Conversation

@dawidbil
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@ziobron ziobron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cząstkowe review dla index.pl.html, 00_intro.pl.md, 01_busy_waiting.pl.md i 02_condition_variable.pl.me
Reszta później :)

Comment thread module4/index.pl.html Outdated
Comment thread module4/index.pl.html Outdated
Comment thread module4/index.pl.html Outdated
Comment thread module4/index.pl.html Outdated
Comment thread module4/01_busy_waiting.pl.md Outdated
Comment thread module4/02_condition_variable.pl.md Outdated

### Zmienna warunku (condition variable)

* <!-- .element: class="fragment fade-in" --> <code>#include <condition_variable></code>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* <!-- .element: class="fragment fade-in" --> <code>#include <condition_variable></code>
* <!-- .element: class="fragment fade-in" --> <code>#include &lt;condition_variable&gt;</code>

Nie wyświetla zawartości w <>, bo uznaje to za tag html

Comment thread module4/02_condition_variable.pl.md Outdated
Comment thread module4/02_condition_variable.pl.md Outdated
Comment thread module4/02_condition_variable.pl.md Outdated
Comment thread module4/02_condition_variable.pl.md
Copy link
Copy Markdown
Contributor

@ziobron ziobron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reszta sprawdzona. Ze zmian, których nie zaznaczyłem to trzeba będzie zmniejszyć poziom wszystkich nagłówków, bo wszędzie pierwsze slajdy pozmieniałem, aby tam był tylko nagłówek pierwszego poziomu.

Comment thread module4/03_memory_model.pl.md Outdated
Comment on lines +3 to +7
# Multithreading

## Moduł 4

### Model pamięci C++
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Multithreading
## Moduł 4
### Model pamięci C++
# Model pamięci C++

Comment thread module4/03_memory_model.pl.md Outdated

___

### Model pamięci C++
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jakby co to ta część z modelu pamięci chyba była już tłumaczona w module 2. Można po prostu ją przerzucić.

Comment thread module4/04_looped_thread.pl.md Outdated
Comment on lines +41 to +49
```bash
$> g++ 01_stop.cpp -lpthread -fsanitize=thread
$> ./a.out
WARNING: ThreadSanitizer: data race (pid=10179)
...
$> g++ 01_stop.cpp -lpthread -fsanitize=thread -03
$> ./a.out
deadlock
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ten fragment bym sugerował dać na całą szerokość już pod kodem i obrazkiem

Comment on lines +102 to +111
```bash
$> g++ 01b_volatile.cpp -lpthread -fsanitize=thread
$> ./a.out
WARNING: ThreadSanitizer: data race (pid=10179)
...
$> g++ 01b_volatile.cpp -lpthread -fsanitize=thread -03
$> ./a.out
WARNING: ThreadSanitizer: data race (pid=10179)
...
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To również na całą szerokość

Comment on lines +254 to +255
<img height="400px" data-src="img/perfect.jpeg" alt="perfect" class="plain">
<!-- .element: class="fragment fade-in" -->
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fajny obrazek 👍

Comment thread module4/07_thread_safe_singleton.pl.md Outdated
Comment on lines +90 to +110
### Przykład: thread-safe Singleton

```c++
class Singleton {
static std::unique_ptr<Singleton> instance_;
static std::once_flag flag_;
Singleton() = default;
public:
static Singleton& getInstance() {
std::call_once(flag_, [&] {
instance_.reset(new Singleton{});
});
return *instance_;
}
};
```
<!-- .element: class="fragment fade-in" -->

* <!-- .element: class="fragment fade-in" --> Wolne (once_flag)
* <!-- .element: class="fragment fade-in" --> Bezpieczne
* <!-- .element: class="fragment fade-in" --> <strike>Trochę mniej kodu</strike>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To jest to samo co na slajdzie z linii 42 - do wywalenia

Comment thread module4/08_call_once_exceptions.pl.md Outdated
Comment on lines +3 to +7
# Multithreading

## Moduł 4

### Wyjątki w call_once
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Multithreading
## Moduł 4
### Wyjątki w call_once
# Wyjątki w call_once

Comment thread module4/08_call_once_exceptions.pl.md Outdated

<div style="width: 44%;">

<div style="background-color: #8B3536; padding: 5px 10px;">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div style="background-color: #8B3536; padding: 5px 10px;">
<div style="padding: 20px;">

Comment thread module4/examples/06_call_once/03b_singleton_without_mutex.cpp Outdated
Comment thread module4/exercises/06_call_once/01_race.cpp Outdated
@ziobron
Copy link
Copy Markdown
Contributor

ziobron commented Jan 19, 2021

Po tych zmianach można śmiało tłumaczyć na angielski. atomic został już przetłumaczony w module 2, ale możliwe że nie cały. Warto skorzystać z gotowca.

Copy link
Copy Markdown
Contributor

@ziobron ziobron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wygląda dobrze :) małe drobiazgi z niektórymi tłumaczeniami już na masterze zmienię. Dzięki!

<< sleepDuration << "ms\n";
cout << msg.str();

this_thread::sleep_for(chrono::milliseconds(sleepDuration)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wcięcie

@ziobron ziobron merged commit 024e87a into coders-school:master Jan 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants