-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo / sample code update #1666
Closed
Closed
Commits on Jul 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 66b0e14 - Browse repository at this point
Copy the full SHA 66b0e14View commit details -
Configuration menu - View commit details
-
Copy full SHA for a238a75 - Browse repository at this point
Copy the full SHA a238a75View commit details -
Configuration menu - View commit details
-
Copy full SHA for a73aaea - Browse repository at this point
Copy the full SHA a73aaeaView commit details -
Improve qtask_ordered sample program
Use hts_tpool_next_result_wait() in threadfn_orderedwrite() so it blocks properly when it has nothing to do. Remove lock and conditional that are no longer needed. Use a sentinel job to tell threadfn_orderedwrite() that there is no more data and it can terminate. Improve error handling. Add a data::result field so that threadfn_orderedwrite() can report back to the main thread if it encountered a problem. Ensure everything is cleaned up correctly if either the main thread or threadfn_orderedwrite() fail, and in the right order. Set the return value to EXIT_FAILURE if either sam_close() or threadfn_orderedwrite() report failure. Ensure error messages are written to stderr.
Configuration menu - View commit details
-
Copy full SHA for c553f40 - Browse repository at this point
Copy the full SHA c553f40View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ce3917 - Browse repository at this point
Copy the full SHA 9ce3917View commit details
Commits on Jul 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2492496 - Browse repository at this point
Copy the full SHA 2492496View commit details
Commits on Jul 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d1c9efa - Browse repository at this point
Copy the full SHA d1c9efaView commit details -
Improve indentation and program flow in DEMO.md
The "..." to indicate clipped out code is useful as it removes a lot of the unnecessary boiler plate, especially error checking, and allows us to drill down to the essense of what we're trying to teach. However without indentation it's not clear what bits are being removed. Also there are times when the code removed is an error handler plus a subsequent else clause, which gives the false impression with the indentation that the if-clause has been negated. Eg: ... //select required field alone, this is useful for CRAM alone if (hts_set_opt(infile, CRAM_OPT_REQUIRED_FIELDS, SAM_FLAG) < 0) { ... //read header in_samhdr = sam_hdr_read(infile); ... Clearly the `sam_hdr_read` is not within the if-clause of `hts_set_opt` returning < 0, but it's how it reads because "..." hid too much. (In the above case just indenting the ... and un-indenting the hdr read call reverses the mental image.) My approach here is to replace all `...` error handlers with `... // error` and to indent them accordingly. Also where we only have a one line thing, removing open curly braces if we've cut the close curly brace gives a more sensible view. None of this is really changing the code we're showing, but presenting it in a more obvious manner to those that don't understand what is and isn't an error case.
Configuration menu - View commit details
-
Copy full SHA for cecc7a7 - Browse repository at this point
Copy the full SHA cecc7a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d0c19e - Browse repository at this point
Copy the full SHA 7d0c19eView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.